wiki:PacpusQtFaq

Version 1 (modified by DHERBOMEZ Gérald, 8 years ago) ( diff )

--

Pacpus components must inherit QObject

Components that use the input / output mechanism of Pacpus must inherit QObject:

  • Take care that QObject requires to be first in multiple inheritance (see extracted documentation below).
  • Don't forget the macro Q_OBJECT in the class declaration
Multiple Inheritance Requires QObject to Be First

If you are using multiple inheritance, moc assumes that the first inherited class is a subclass of QObject. Also, be sure that only the first inherited class is a QObject.
// correct
class SomeClass : public QObject, public OtherClass
{
    Q_OBJECT
    ...
};
Virtual inheritance with QObject is not supported. 
Note: See TracWiki for help on using the wiki.