17 Sep 01:28
Q_OBJECT
From: Franco Amato <famato0 <at> gmail.com>
Subject: Q_OBJECT
Newsgroups: gmane.comp.graphics.qwt.general
Date: 2008-09-16 23:28:05 GMT
Subject: Q_OBJECT
Newsgroups: gmane.comp.graphics.qwt.general
Date: 2008-09-16 23:28:05 GMT
Hi to all,
I'm writing a little application integrating Qt (for the GUI part) and coin3D for the simulation part.
I wrote a class named SndTestViewer that inherits from SoQtViewer (from coin3d). In this class
I added the macro Q_OBJECT because I would implement in the same class the signal/slot mechanism.
When I compile I got lots these errors:
moc/moc_SndTestViewer.cpp:37: error: 'staticMetaObject' is not a member of 'SoQtViewer'
moc/moc_SndTestViewer.cpp: In member function 'virtual void* SndTestViewer::qt_metacast(const char*)':
moc/moc_SndTestViewer.cpp:51: error: 'qt_metacast' is not a member of 'SoQtViewer'
moc/moc_SndTestViewer.cpp: In member function 'virtual int SndTestViewer::qt_metacall(QMetaObject::Call, int, void**)':
moc/moc_SndTestViewer.cpp:56: error: 'qt_metacall' is not a member of 'SoQtViewer'
Reading some online document I discovered that if a class doesn't inherits from a QObject I don't have to add the Q_OBJECT
macro, but how can implement the signal-slot so?
Regards,
Franco
I'm writing a little application integrating Qt (for the GUI part) and coin3D for the simulation part.
I wrote a class named SndTestViewer that inherits from SoQtViewer (from coin3d). In this class
I added the macro Q_OBJECT because I would implement in the same class the signal/slot mechanism.
When I compile I got lots these errors:
moc/moc_SndTestViewer.cpp:37: error: 'staticMetaObject' is not a member of 'SoQtViewer'
moc/moc_SndTestViewer.cpp: In member function 'virtual void* SndTestViewer::qt_metacast(const char*)':
moc/moc_SndTestViewer.cpp:51: error: 'qt_metacast' is not a member of 'SoQtViewer'
moc/moc_SndTestViewer.cpp: In member function 'virtual int SndTestViewer::qt_metacall(QMetaObject::Call, int, void**)':
moc/moc_SndTestViewer.cpp:56: error: 'qt_metacall' is not a member of 'SoQtViewer'
Reading some online document I discovered that if a class doesn't inherits from a QObject I don't have to add the Q_OBJECT
macro, but how can implement the signal-slot so?
Regards,
Franco
------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________ qwt-interest mailing list qwt-interest <at> lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qwt-interest
RSS Feed