What is Q_PROPERTY what is its use ?
-
Hi,
can any body explain what is Q_PROPERTY and when to use it?
-
Consult "the docs":http://qt-project.org/doc/qt-4.8/properties.html. Properties are parts of Qt's Meta Object system: once you declare a Q_PROPERTY, it is available for invocation through MOC (QObject::setProperty(), QObject::property(), and indirectly by QObject::invokeMethod()).
QProperties are widely used by in QML. In fact they are a crucial, basic part of QML.
-
IIRC other language bindings also rely on Q_PROPERTY being present. E.g. if you want to export a Qt object into a javascript runtime.