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