For a number of reasons I am contemplating redoing an program I use at work in pyqt4 (at present it is in pygtk). After playing around with it and getting a feel for it and
This is not a QT issue, but a lack of understanding of how multiple inheritance works. You can absolutely use multiple inheritance, but it is a tricky subject in Python.
In a nutshell, in your last example, the first __init__
is called, so if you changed class D(QtGui.QMainWindow,A):
to class D(A, QtGui.QMainWindow):
you would see A
's constructor called, and not QMainWindow
's one.
See the following links for further reference on super()
behavior with multiple inheritance: