Important: Please read the Qt Code of Conduct -

Problems with QML Bindings

  • Hi! I have a class with a QVariantMap property which contains a color scheme. I use Q_PROPERTY. I set colors like color: style.win_background;. The style declaration: property var style:; onStyleChanged: { console.log("Changed"); } When I change the win_background property of style I get in console the message: qml: Changed but the window color is not changed. What I am doing wrong?

  • Try calling styleChanged() after modifying style.

  • Thanks! I fix the problem. All works fine, but I have a Rectangle over that hide the window background and that was the problem.