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

QML comma operator property lookup failure

    XMLWordPrintable

Details

    • Linux/X11
    • 074190902a96c550d9aeb55ead19c0697ce1cbc3

    Description

      The following test case fails to update as expected.  Either of the commented-out variants for the binding of property 'active' work as expected.

       

      import QtQuick 2.7
      import QtQuick.Window 2.2
      
      Window {
        id: root
      
        property var testObject: ({ 'prop': true })
      
        width: 400
        height: 200
      
        Item {
          id: innerItem
      
          property int counter
          //property bool active: innerItem.counter, testObject.prop	            // works
          //property bool active: counter !== undefined ? testObject.prop : false // works
          property bool active: counter, testObject.prop
      
          anchors.fill: parent
      
          Timer {
            id: timer
            interval: 1000
            running: true
            repeat: true
            onTriggered: {
              testObject.prop = !testObject.prop
              ++innerItem.counter
            }
          }
      
          Text {
            anchors.centerIn: parent
            text: innerItem.active
          }
        }
      }
      
      

      Attachments

        For Gerrit Dashboard: QTBUG-69973
        # Subject Branch Project Status CR V

        Activity

          People

            erikv Erik Verbruggen
            mvogt2 Matthew Vogt
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes