I have done a GUI interface with Qt designer and compiled the .ui file into a .py file. In main window I have this class:
class Projektdlg(QMainWindow, ui_Projekt.Ui_MainWindow):
def __init__(self, parent=None):
super(Projektdlg, self).__init__(parent)
self.setupUi(self)
self.connect(self.actionCalibration, SIGNAL("triggered()"), self.CalibrationSettings)
I want to open the QDialog from the generated ui_calibration file when clicking on calibration from the tool bar. How to do that?
def CalibrationSettings(self):
Dialog = ui_calibration.Ui_DialogCalibration()
All modules are imported
Try something like this:
Then in your class:
Then you can call
Dialog.show()orDialog.exec_()