1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
#ifndef OBJECT_HPP #define OBJECT_HPP #include <QObject> class Object : public QObject { Q_OBJECT Q_PROPERTY(int test READ getTest) public: Object(); int getTest() { return _test; } Q_SLOT void aSlot(); private: int _test; }; #endif