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

Change signal emitted for empty array

    XMLWordPrintable

Details

    Description

      Similar to QTBUG-42255, this one is about assigning an empty array to an already-empty array.

      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.length !== 0)
                  root.something = []
              }
          }
      }
      

      Attachments

        Issue Links

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

          Activity

            People

              shausman Simon Hausmann
              ske Steve
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes