On Wednesday 20 April 2011 13:01:57 Zoltan Szalai wrote:
> 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#mul
> tiple-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).

(I haven't looked at your code.)

The limitation doesn't come from python or PyQt. Its purely because of Qt and 
means that you can not inherit from multiple classes that are or inherit from 
QObject. And its the same for all class-trees I believe. Unless you use 
virtual inheritance in C++, but last time I tried (some years back) that led 
to strange errors and was neither encouraged nor supported in any point in Qt.

Have fun,

Arnold

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to