This is the simplest of the macros, PROPERTY. It takes a data Type and the Name of the property, then takes care of not only generating the Q_PROPERTY statement, but also the required getter and setter methods:
/** * @def PROPERTY(Type, Name) * * @brief A macro to define a class "Property" (Q_PROPERTY). * @param Type - the type of the property * @param Name - the name of the property * * This macro defines a Q_PROPERTY, its storage, and the required getter and * setter methods. This allows the property to be accessed by through the * QObject or Q_GADGET system. It also makes importing and exporting the class * to XML Streams very easy as the property system does most of the work for you. * * @note This can only be used with a class that inherits from QObject or Q_GADGET */ #define PROPERTY(Type, Name) ...