Signal when changes occur to *data* property



  • 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"
    

Log in to reply
 

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