| 1 | = Pacpus components must inherit QObject = |
| 2 | |
| 3 | Components 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 | {{{ |
| 8 | Multiple Inheritance Requires QObject to Be First |
| 9 | |
| 10 | 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. |
| 11 | // correct |
| 12 | class SomeClass : public QObject, public OtherClass |
| 13 | { |
| 14 | Q_OBJECT |
| 15 | ... |
| 16 | }; |
| 17 | Virtual inheritance with QObject is not supported. |
| 18 | }}} |