| 2 | |
| 3 | == MSVC == |
| 4 | |
| 5 | === ```ComponentBase``` should be inherited AFTER ```QObject``` === |
| 6 | |
| 7 | ==== Error message ==== |
| 8 | {{{ |
| 9 | >moc_Component.cpp(63): error C2039: 'staticMetaObject' : is not a member of 'pacpus::ComponentBase' |
| 10 | > ComponentBase.h(60) : see declaration of 'pacpus::ComponentBase' |
| 11 | >moc_Component.cpp(80): error C2039: 'qt_metacast' : is not a member of 'pacpus::ComponentBase' |
| 12 | > ComponentBase.h(60) : see declaration of 'pacpus::ComponentBase' |
| 13 | >moc_Component.cpp(85): error C2039: 'qt_metacall' : is not a member of 'pacpus::ComponentBase' |
| 14 | > ComponentBase.h(60) : see declaration of 'pacpus::ComponentBase' |
| 15 | }}} |
| 16 | |
| 17 | ==== Solution ==== |
| 18 | |
| 19 | Your class declaration should look like: |
| 20 | {{{ |
| 21 | class Component |
| 22 | : QObject |
| 23 | , ComponentBase |
| 24 | { |
| 25 | }; |
| 26 | }}} |
| 27 | |
| 28 | == GCC == |