oop - Python 3, PyQt 4: split large class for GUI controls -
My class Just look at how this looks (very simple, of course): In my application, I did this, main window that has hair widgets (frame and stuff ...), main window is basically two things : Initializing your children and connecting signal beetwheel, you have the hierarchy of ideas that you have, D is much easier to handle the matter. I think your program is not a painless step in a more graded one, I can say: You should, though before that, but I do not. = P main window and its children to QTdesigner comes in very easy to design. And yes, AFAIK should not get one class more than PyQt class. MainWindow (QMainWindow) PyQt4 GUI is now incremented and I have it I also want to divide the way. The problem is that many tasks of handling the signal are very connected and affect other work in the classroom. Is there any way to split it into multiple squares / files? Perhaps all signals are divided into one class? I do not really understand how to do it technically ... I have also heard that there is some restriction of QT (or PEET) for many heritage, which I think can solve the problem (again From, not quite clear to me).
calss MainWindow (QMainWindow): ... def f1 (self) : If self.a1 == '...': ... def f2 (self): if self.a2 == '...': ... def update (self): self.f3 () self. F4 () self.lineEdit.setText (self.a3) ... ... def on_radioButton_toggled (self): if self.radioButton.isChecked (): self.a1 = '...' def on_comboBox_currentIndexChanged (self): if Self.checkBox.isChecked (): self.a2 = '...' self.f1 () Other: self.f2 () self.update () ... < P>
Comments
Post a Comment