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

Flow layout not responding to change of flow property

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 4.7.0
    • 4.7.1
    • None
    • qt-qml HEAD at f4e82d86ce597e84d5e58abb3d69c898b9be4b31
    • f54353bf2f566335e44d20b5263fe19d5ac33d1e

    Description

      Run the code below. Click anywhere and the layout of the red and blue rectangles should
      alternate between side-by-side and one-above-the-other, but nothing happens.

      import Qt 4.7
      
      Rectangle {
          width: 640; height: 480;
      
          property bool isInPortrait: false
      
          Flow {
              flow: isInPortrait ? Flow.LeftToRight : Flow.TopToBottom
              spacing: 20
              anchors.horizontalCenter: parent.horizontalCenter
              Rectangle { color: "red"; width: 200; height: 50 }
              Rectangle { color: "blue"; width: 200; height: 50 }
          }
      
          MouseArea { anchors.fill: parent; onClicked: { print("clicked"); isInPortrait = !isInPortrait } }
      }
      

      Attachments

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

        Activity

          People

            jpetrell Joona Petrell
            mathiasm Mathias Malmqvist
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes