Important: Please read the Qt Code of Conduct -

Undo the setContextProperty

  • Can we undo the setContextProperty() operation ? I use setContextProperty to bind a particular property to the QML. I want to add a feature wherein I should be able to undo this binding "effect" dynamically ?


  • Within my team we talked about such a feature. If the Qt object is gone, the QML can try to access an invalid reference. It is the same as using a invalid pointer to an not existing object.
    From my point of view it is not necessary to handle this situation.
    What is your reason?

  • Qt Champions 2017

    Export2QML *obj = new Export2QML;


            if (abc != null) {
            }else {
                console.log("Object is null")

Log in to reply