Pyqt Ui Event Control Segregation
I am a beginner in python but my OOPS concept from Java and Android are strong enough to motivate me in making some tool in python. I am using PyQt for developing the application.
Solution 1:
Okay i got this working with changes in
Mainwindow.py
classMainWindow(QtGui.QMainWindow):
def__init__(self, parent = None):
super(MainWindow, self).__init__(parent)
Profile().notify(None)
self.ui = Ui_MainWindow()
self.ui.setupUi(self)
self.connectButtons()
SemiAuto_Create_Load(self, self.ui)
And
SemiAuto_Create_Load
classSemiAuto_Create_Load(QtGui.QMainWindow):
def__init__(self, parent, ui):
super(SemiAuto_Create_Load, self).__init__(parent)
self.ui = ui
self.connectControlEvents()
defconnectControlEvents(self):
self.ui.load_vsa_radio.clicked.connect(self.onLoad_vsa_radio)
self.ui.create_vsa_radio.clicked.connect(self.onCreate_vsa_radio)
Problem was passing the parameter with parent in init() and trying to get the object of MainGUI directly instead of as a parameter from MainWindow
Post a Comment for "Pyqt Ui Event Control Segregation"