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

Multiple useless property bindings

    XMLWordPrintable

Details

    • e06211e4c67c0c7470fdac86c3fa6d50792516c5 (qt/tqtc-qtdeclarative/5.12.0)

    Description

      The code below outputs the following 3 lines:

      rectangle updated toprect.width=320
      rectangle updated toprect.width=640
      rectangle updated toprect.width=320
      

      Why the toprect.width is set to 640 pixels ? This cause an useless property binding.
      This bug only happens with the qmlviewer.

      import Qt 4.7
      
      Rectangle {
          id: toprect
          width: 320
          height: 240
      
          Rectangle {
              color:"yellow"
              width: { console.log("rectangle updated toprect.width="+toprect.width); toprect.width*2/3 }
              height: toprect.height*2/3
          }
      
          Text {
              anchors.centerIn: parent
              text: "Hello World"
          }
      }
      

      Attachments

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

        Activity

          People

            martjone Martin Jones (closed Nokia identity) (Inactive)
            agroyer Anthony Groyer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes