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

[REG 5.9 -> 5.11] Warning: expression depends on non-NOTIFYable properties: QQuickRectangle::anchors

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Incomplete
    • Icon: Not Evaluated Not Evaluated
    • None
    • 5.11.0 Alpha
    • None
    • All

      Hello,

      In the dev branch, the following code produces a warning (property binding of "width"):

      Rectangle {
          radius: parent.radius
          anchors.left: parent.left
          anchors.top: parent.top
          anchors.bottom: parent.bottom
          anchors.topMargin: 1
          anchors.leftMargin: 1
          anchors.bottomMargin: 1
          width: Math.max(0, (parent.width - parent.border.width - anchors.leftMargin) * bar.ratio / 100)
      }
      

      The warning:

      QQmlExpression: Expression qrc:///Gui/Widgets/CustomProgressBar.qml:40:20 depends on non-NOTIFYable properties:
          QQuickRectangle::anchors
      

      The property "anchors" is a CONSTANT property so we should not have this warning (we don't have it in 5.9.2). This warning previously made sense when the property was neither CONSTANT nor NOTIFYable.

      This also affects several examples (see qtbug65743_examples_log.txt)

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

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            amnell Louis du Verdier
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes