[Qt-interest] Inheritance limitations

Scott Sibley sisibley at gmail.com
Mon Oct 12 23:31:46 CEST 2009


I get the following warning with these two classes. I think I'm learning to
cope with it (I'm rewriting a pygtk app in C++ and QT, where I just dropped
signals wherever I liked), but was curious why there's the limitation.

[starlon at localhost tmp]$ moc-qt4 -I/usr/include/QtCore -o moc_test.cc test.h
test.h:11: Warning: Class B inherits from two QObject subclasses QObject and
A. This is not supported!

// test.h
class A: public virtual QObject {
    Q_OBJECT
};

class B: public virtual QObject, public A {
    Q_OBJECT
};
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20091012/735a96c8/attachment.html 


More information about the Qt-interest-old mailing list