Changes between Initial Version and Version 1 of PacpusQtFaq


Ignore:
Timestamp:
Feb 14, 2016, 11:18:15 AM (9 years ago)
Author:
DHERBOMEZ Gérald
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PacpusQtFaq

    v1 v1  
     1= Pacpus components must inherit QObject =
     2
     3Components that use the input / output mechanism of Pacpus must inherit QObject:
     4- Take care that QObject requires to be first in multiple inheritance (see extracted documentation below).
     5- Don't forget the macro Q_OBJECT in the class declaration
     6
     7{{{
     8Multiple Inheritance Requires QObject to Be First
     9
     10If 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.
     11// correct
     12class SomeClass : public QObject, public OtherClass
     13{
     14    Q_OBJECT
     15    ...
     16};
     17Virtual inheritance with QObject is not supported.
     18}}}