Property declaration globally



  • I would like to access the property in all the components, I have property real ropacity:0 but I am unable to access the ropacity in my Component Item, it says it is not a valid property.
    Thanks in advance


  • Moderators

    Add it to root context in C++.
    @
    // Typing from memory, actual code might need to be adjusted:
    QQuickView::rootContext()->setContextProperty("propertyName", andHereYourValue);
    @


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.