// a.h ////////////////////////////////////////////////////////////////////////////// #ifndef A_H #define A_H #include #include #ifdef BUILD_A # define A_EXPORT Q_DECL_EXPORT #else # define A_EXPORT Q_DECL_IMPORT #endif // BUILD_A class A_EXPORT A : public QObject { Q_OBJECT Q_ENUMS(Foo) public: enum Foo { Bar }; void dummyFunction(); }; #endif // A_H // b.h ////////////////////////////////////////////////////////////////////////////// #ifndef B_H #define B_H #include #include #include "a.h" #ifdef BUILD_B # define B_EXPORT Q_DECL_EXPORT #else # define B_EXPORT Q_DECL_IMPORT #endif // BUILD_B class B_EXPORT B : public QObject { Q_OBJECT Q_PROPERTY(A::Foo foo READ foo) // <--------------- !!! public: A::Foo foo() const; }; #endif // B_H