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()
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)