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. Signal when changes occur to *data* property

Signal when changes occur to *data* property

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 412 Views 1 Watching
  • 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.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Is it possible to get notified when an items data property changes?

    There's a onChildrenChanged signal which works for visual items but I'm looking for the non-visuals

    The following doesn't work:

    import QtQuick 2.0
    
    Item {
        id: modes
    
        Connections {
            target: modes
            onDataChanged: {
                for(var m in modes.data) {
                    var d = modes.data[m]
                }
            }
        }
    
        onDataChanged: {
              for(var m in modes.data) {
                  var d = modes.data[m]
              }
        }
    }
    

    Both gives me the error:

    Cannot assign to non-existent property "onDataChanged"
    
    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