Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Binding loop detected for property "width" when I add 20 to width
Forum Updated to NodeBB v4.3 + New Features

Binding loop detected for property "width" when I add 20 to width

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 2 Posters 1.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    wspilot
    wrote on last edited by
    #1

    Hi,
    When I do:
    @width : childrenRect.width + 20@

    I get the
    @Binding loop detected for property "width"@

    error.
    Without the "+ 20" no error.
    Still, the app works OK: the 20pix do get added to the width correctly.
    Should I ignore the error message?
    Thanks.

    1 Reply Last reply
    0
    • T Offline
      T Offline
      t3685
      wrote on last edited by
      #2

      I believe you get this error because childrenRect.width changes when width changes. So width = childrenRect.width + 20 -> childrenRect.width changes because width changes -> width changes because childrenRect.width changes etc.

      Best not to ignore this.

      1 Reply Last reply
      0
      • W Offline
        W Offline
        wspilot
        wrote on last edited by
        #3

        Thanks, but
        childrenRect.width can (should) not change because it is not dependant on its parents width.
        If it were then we would have a binding loop.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved