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

Assigning undefined to anchors doesn't work

XMLWordPrintable

    • Windows

      I want to change the position of an element dynamically via anchors, either to the right edge of the parent element or to the left. For this, I use anchors.left and anchors.right. When I want to display an element on the left, I assign parent.left to anchors.left and undefined to anchors.right. In the case when I need to display an element on the right, I assign parent.right to anchors.right and undefined to the anchors.left property. But this only works once, see the attached video. I also attach an archive with the source code for playback.
      Here is a specific section of code for assigning the desired values:

      anchors.left: isLeft ? parent.left : undefined
      anchors.right: isLeft ? undefined : parent.right 

        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
            rumgot rumgot
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes