main_gen_test.cpp 328 B

123456789101112131415161718192021222324
  1. #include <QObject>
  2. #include "myinterface.h"
  3. class MyObject : public QObject, MyInterface
  4. {
  5. Q_OBJECT
  6. Q_INTERFACES(MyInterface)
  7. public:
  8. explicit MyObject(QObject* parent = 0)
  9. : QObject(parent)
  10. {
  11. }
  12. };
  13. int main(int argc, char** argv)
  14. {
  15. MyObject mo;
  16. mo.objectName();
  17. return 0;
  18. }
  19. #include "main_gen_test.moc"