Beispiel #1
0
 def __init__(self, parent=None):
     super(_TestClass, self).__init__(parent)
     geo = QApplication.desktop().screenGeometry()
     self.setGeometry(geo.width() / 4,
                      geo.height() / 4,
                      geo.width() / 2,
                      geo.height() / 2)
Beispiel #2
0
 def __init__(self, parent=None):
     super(CardExample, self).__init__(parent)
     geo = QApplication.desktop().screenGeometry()
     self.setGeometry(geo.width() / 4,
                      geo.height() / 4,
                      geo.width() / 1.5,
                      geo.height() / 2)
     self._init_ui()
 def _slot_show_detail(self):
     dialog = QTextEdit(self)
     dialog.setReadOnly(True)
     geo = QApplication.desktop().screenGeometry()
     dialog.setGeometry(geo.width() / 2,
                        geo.height() / 2,
                        geo.width() / 4,
                        geo.height() / 4)
     dialog.setWindowTitle(self.tr('Error Detail Information'))
     dialog.setText(self.property('history'))
     dialog.setWindowFlags(Qt.Dialog)
     dialog.show()
Beispiel #4
0
 def __init__(self, parent=None):
     super(CardExample, self).__init__(parent)
     self.setWindowTitle('Examples for MCard')
     geo = QApplication.desktop().screenGeometry()
     width = float(geo.width())
     height = float(geo.height())
     x = int(width / 4)
     y = int(height / 4)
     w = int(width / 1.5)
     h = int(height / 2)
     self.setGeometry(x,y,w,h)
     self._init_ui()
Beispiel #5
0
    def __init__(self, parent=None):
        super(AddDelete, self).__init__(parent)
        self.tag_lay = MFlowLayout()
        tag1 = MTag('Unremoveable')
        tag2 = MTag('Tag2').closeable()
        tag3 = MTag('Tag3').closeable()
        add_tag = MNewTag('New Tag')
        add_tag.sig_add_tag.connect(self.slot_add_tag)
        self.tag_lay.addWidget(tag1)
        self.tag_lay.addWidget(tag2)
        self.tag_lay.addWidget(tag3)
        self.tag_lay.addWidget(add_tag)

        main_lay = QHBoxLayout()
        main_lay.addLayout(self.tag_lay)
        self.setLayout(main_lay)

        geo = QApplication.desktop().screenGeometry()
        self.setGeometry(geo.width() / 4,
                         geo.height() / 4,
                         geo.width() / 2,
                         geo.height() / 2)