Set objectName property as "required". How?
Unsolved
QML and Qt Quick
-
Hello all!
I am developing kind of library that includes some QML components. In some cases I need "objectName" property as required property. Is there any QML predefined mechanism to check if it not defined by developer and not equal to undefined? I mean not by manual checking by JavaScript function. I mean anything that already inside of QML Component.
I found only solution for myself like this:
Item { required property string pObjectName; ... id: oRoot; objectName: oRoot.pObjectName; ... }
Is there more delicate way to ensure this property defined by developer?