Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QDeclarativeItem: why does the state property use private headers?
bundickt last edited by
I was just wondering if there was a reason the state accessor functions were in the private headers?
Is it a bad Idea for me to use the state property in the my plugin code?
I want to be able to read what state my QDeclarativeItem is in; I guess I will have to use property(const char *) and setProperty(...).
thisisbhaskar last edited by
These properties defined with Q_PRIVATE_PROPERTY() macro.. and tried searching for the definition of this macro, but could not find it anywhere ...
mbrasser last edited by
In general properties have been marked private with Q_PRIVATE_PROPERTY() when they are meant to be used from QML only (usually because they return a private type, or sometimes because they offer a rather poor C++ API). I wouldn't have thought that state fell into either category, however.
I'll follow up and see if there is any issue with making it a regular Q_PROPERTY for Qt 5.
lgeyer last edited by
[quote author="Vijay Bhaska Reddy" date="1311061589"]These properties defined with Q_PRIVATE_PROPERTY() macro.. and tried searching for the definition of this macro, but could not find it anywhere ...[/quote]
Because those macros are replaced by moc instead of the preprocessor (like Q_OBJECT).