Пример #1
0
 def __init__(self, parent=None):
     QtWidgets.QDialog.__init__(self)
     generated_dialog_qt.Ui_Constants_Dialog.__init__(self)
     self.setupUi(self)
     self.close_button.clicked.connect(self.close_clicked)
     self.save_button.clicked.connect(self.save_clicked)
     qt_persistence.gui_load(self, data)
Пример #2
0
 def calculate_clicked(self):
     qt_persistence.gui_save(self, data)
     if isinstance(QtWidgets.QApplication.focusWidget(),
                   QtWidgets.QLineEdit):
         name = QtWidgets.QApplication.focusWidget().objectName()
         self.set_values(name, data)
         qt_persistence.gui_load(self, data)
Пример #3
0
 def __init__(self):
     QtWidgets.QMainWindow.__init__(self)
     generated_window_qt.Ui_Rate_Calculator.__init__(self)
     self.setupUi(self)
     self.dialog = ConstantsDialog(self)
     self.calculate_button.setFocusPolicy(QtCore.Qt.NoFocus)
     self.clear_button.setFocusPolicy(QtCore.Qt.NoFocus)
     self.constants_action.triggered.connect(self.show_constants_dialog)
     self.calculate_button.clicked.connect(self.calculate_clicked)
     self.clear_button.clicked.connect(self.clear_line_edits)
     qt_persistence.gui_load(self, data)