[Qt-interest] Problem porting software to QT

fungos fungos at gmail.com
Fri Apr 10 04:15:02 CEST 2009


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!



On Thu, Apr 9, 2009 at 4:31 AM, Sean Harmer
<sean.harmer at maps-technology.com> wrote:
> On Thursday 09 April 2009 04:46:53 fungos wrote:
>> Hi, I'm trying to do a production software port to Qt, but when I add
>> "Q_OBJECT" macro to an existing class I got these weird vtable errors,
>> see:
> Try re-running qmake so that the build system knows to run moc on that header
> file now.
>
> Sean
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>



-- 
Animal Frontline Liberation



More information about the Qt-interest-old mailing list