#include #include "test.h" void TestObject::testSlot1() { qInfo() << "Hi 1" << endl; } #ifndef MOC_SHOULD_SEE_THIS void TestObject::testSlot2() { qInfo() << "Hi 2" << endl; } #endif int main(int argc, char *argv[]) { TestObject obj; obj.testSlot1(); #ifndef MOC_SHOULD_SEE_THIS obj.testSlot2(); #endif return 0; }