[PyQt] derive from a designer widget

Mario Daniel Carugno carugnom at gmail.com
Thu Mar 12 11:59:50 GMT 2009


2009/3/12 Andreas Pakulat <apaku at gmx.de>:
>> Thank you Andreas, i'll try it. Just in case, do you have some example
>> of that ?
>
> Its pretty easy (from the top of my head, so might not work right away, but
> you should get the idea)
>
> class MyMainWindow(QMainWindow):
>    def __init__(self,parent):
>        QMainWindow.__init__(self,parent)
>        self.ui = Ui_MainWindow()
>        self.ui.setupUi(this)
>
> class MyCustomMainWindow(MyMainWindow):
>    def __init__(self,parent):
>        MyMainWindow.__init__(self,parent)
>        self.mybutton = QPushButton(self.ui.centralFrame)
>

Great ! Thank you very much



More information about the PyQt mailing list