[PyQt] Multiple Inheritance

Zoltan Szalai defaultdict at gmail.com
Wed Apr 20 12:01:57 BST 2011


Hi All,

The PyQt Reference Guide says:
"It is not possible to define a new Python class that sub-classes from 
more than one Qt class."
[ 
http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/gotchas.html#multiple-inheritance 
]

The code attached works here until you remove the comment before the 
last line. Then it raises a TypeError.
I should really use something like this in a PyQt app (if it's not a 
very bad idea anyway) and I wonder what are the limitations here or what 
are the best practices to solve this kind of problem (if there are any).

versions:
PyQt: 4.8.3
Qt: 4.7.1
sip: 4.12.1
python: 2.6.5

bests
Zoli

-------------- next part --------------
A non-text attachment was scrubbed...
Name: inheritance.py
Type: text/x-python
Size: 1151 bytes
Desc: not available
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20110420/5a9c835e/attachment.py>


More information about the PyQt mailing list