Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Problems with QML Bindings
QtWS25 Last Chance

Problems with QML Bindings

Scheduled Pinned Locked Moved QML and Qt Quick
qml bindingqmlqpropertysignals
3 Posts 2 Posters 1.3k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lixcode
    wrote on last edited by Lixcode
    #1

    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: theme.data; 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?

    1 Reply Last reply
    0
    • X Offline
      X Offline
      xargs1
      wrote on last edited by
      #2

      Try calling styleChanged() after modifying style.

      1 Reply Last reply
      0
      • L Offline
        L Offline
        Lixcode
        wrote on last edited by
        #3

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

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved