Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-42255

Change signal emitted for undefined value

XMLWordPrintable

      This code triggers the onSomethingChanged signal handler each time something is set with undefined, which it already is - this is not a change.

      import QtQuick 2.3
      
      Item {
          id: root
      
          property var something
      
          onSomethingChanged: {
              console.log("Something changed!")
          }
      
          Timer {
              running: true
              interval: 200
              repeat: true
              onTriggered: {
                  // if (root.something !== undefined)
                  root.something = undefined;
              }
          }
      }
      

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            shausman Simon Hausmann
            ske Steve
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes