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

Binding should either reject or properly handle non-object targets

    XMLWordPrintable

Details

    Description

       

      import QtQuick
      Rectangle {
        id: top; objectName: "top"
        visible:true; width:300; height:300  
        Text {
          id: trtext
          width: 30; height: 30
          text: "1234.56"
          font.bold: true    
          Binding {
            target: trtext.font; property: 'bold'
            value: false; when: width < 30
          }
        }
      }
      

      The example from the linked bug should have either been rejected by binding, or it should have worked correctly. Considering that Binding documents that it takes an object, we might want to simply reject it (and  simply support the use case above with generalized grouped properties, which should already exist for Binding in 6.3).

      Attachments

        Issue Links

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

          Activity

            People

              qtqmlteam Qt Qml Team User
              fabiankosmale Fabian Kosmale
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes