Hi,

I believe that PySide (and PyQt for that matter) are widely used for GUI 
design.  There are two main "orderly" ways to start a GUI program, after 
designing it in the Qt Creator: 

(1)
With dual inheritance:
class MainWindow(QMainWindow, Ui_MainWindow):
    def __init__(self, parent=None):
        super(MainWindow, self).__init__(parent)
        self.setupUi(self)

(2)
Without dual inheritance:
class MainWindow(QMainWindow):
    def __init__(self, parent=None):
        super(MainWindow, self).__init__(parent)
        self.ui = Ui_MainWindow
        self.ui.setupUi(Ui_MainWindow(),self)

There have been some horror stories about the evils of multiple 
inheritance.  What is the preferred method, (1) or (2)?  

Thank you in anticipation of your response.

Al.
_______________________________________________
PySide mailing list
[email protected]
http://lists.qt-project.org/mailman/listinfo/pyside

Reply via email to