Shared.h 469 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef SHARED_H
  2. #define SHARED_H
  3. #include <QtCore>
  4. struct Row
  5. {
  6. int a;
  7. int b;
  8. int c;
  9. QString d;
  10. private:
  11. Q_GADGET
  12. Q_PROPERTY(int a MEMBER a)
  13. Q_PROPERTY(int b MEMBER b)
  14. Q_PROPERTY(int c MEMBER c)
  15. Q_PROPERTY(QString d MEMBER d)
  16. };
  17. class TestObject : public QObject, public Row
  18. {
  19. Q_OBJECT
  20. Q_PROPERTY(int a MEMBER a)
  21. Q_PROPERTY(int b MEMBER b)
  22. Q_PROPERTY(int c MEMBER c)
  23. Q_PROPERTY(QString d MEMBER d)
  24. };
  25. #endif // SHARED_H