[Qt-interest] Problem porting software to QT
Tony Rietwyk
tony.rietwyk at rightsoft.com.au
Fri Apr 10 06:56:46 CEST 2009
Hi,
I think there can only be one QObject based anscestor in the list, and it
must come first. Try:
class Screen : public QGraphicsScene, public IScreen
{
Q_OBJECT
...
};
Hope that helps,
Tony
> This problem was solved, but sometimes it comes back (must be
> QtCreator bug or something else).
>
> No I'm having another problem:
>
> ..\Include\platform\qt\QtScreen.h:137: Warning: Class Screen inherits
> from two QObject subclasses IScreen and QGraphicsScene. This is not
> supported!
> debug\moc_QtScreen.cpp:39: error: `staticMetaObject' is not a member
> of `Engine::Interface::IScreen'
> debug\moc_QtScreen.cpp: In member function `virtual void*
> Engine::QT::Graphic::Screen::qt_metacast(const char*)':
> debug\moc_QtScreen.cpp:55: error: `qt_metacast' is not a member of
> `Engine::Interface::IScreen'
> debug\moc_QtScreen.cpp: In member function `virtual int
> Engine::QT::Graphic::Screen::qt_metacall(QMetaObject::Call, int,
> void**)':
> debug\moc_QtScreen.cpp:60: error: `qt_metacall' is not a member of
> `Engine::Interface::IScreen'
>
>
> As I said in the first post, my code is this:
>
> class Screen : public IScreen, public QGraphicsScene
> {
> Q_OBJECT
>
> friend ...
>
> private:
> ...
>
> };
>
>
> And this is the one class in ~450 files that has Q_OBJECT. This class
> is declared in header and defined in a cpp.
> What is the problem now?
>
> Thanks!
More information about the Qt-interest-old
mailing list