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. I think it is BUG in QML element Flow
Forum Update on Monday, May 27th 2025

I think it is BUG in QML element Flow

Scheduled Pinned Locked Moved QML and Qt Quick
5 Posts 2 Posters 3.6k Views
  • 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.
  • S Offline
    S Offline
    syrianzoro
    wrote on 11 Dec 2010, 12:27 last edited by
    #1

    The Flow Element doesn't work properly. I tried to reverse the direction of the layout by changing the flow property like this

    @

    import Qt 4.7

    Rectangle{
    id:main
    width:300; height:300

    Flow{
        flow:"RightToLeft"
    
            spacing:40
            Rectangle{id:one; width:30; height:30; color:"green"}
            Rectangle{id:two; width:30; height:30; color:"red"}
    
    }
    

    }
    @

    Qt is the future

    1 Reply Last reply
    0
    • X Offline
      X Offline
      xsacha
      wrote on 11 Dec 2010, 12:32 last edited by
      #2

      From the "documentation":http://doc.qt.nokia.com/latest/qml-flow.html#flow-prop :

      Possible values are:
      Flow.LeftToRight (default) - Items are positioned next to to each other from left to right until the width of the Flow is exceeded, then wrapped to the next line.
      Flow.TopToBottom - Items are positioned next to each other from top to bottom until the height of the Flow is exceeded, then wrapped to the next column.

      Is this the effect you desired, by the way? (I know this flips the elements too)
      @
      import QtQuick 1.0

      Rectangle {
      width:300; height:300
      x: width; transform: Rotation {axis { x: 0; y: 1; z: 0 } angle: 180} // RightToLeft?
      Flow {
      spacing:40
      Rectangle{id:one; width:30; height:30; color:"green"}
      Rectangle{id:two; width:30; height:30; color:"red"}
      }
      }@

      • Sacha
      1 Reply Last reply
      0
      • S Offline
        S Offline
        syrianzoro
        wrote on 11 Dec 2010, 12:58 last edited by
        #3

        thank you xsacha,
        but how about right to left culture , like Arabic language, the layout system doesn't offer that, in QML.

        but the value RightToLeft comes from the autocompletion system in QtCreator!!!

        Qt is the future

        1 Reply Last reply
        0
        • X Offline
          X Offline
          xsacha
          wrote on 11 Dec 2010, 13:05 last edited by
          #4

          Hmm, my QtCreator doesn't offer any RightToLeft auto-completion. I'm using Qt4.7.1/QtQuick 1.0

          They are looking at adding this in future.
          See here: http://bugreports.qt.nokia.com/browse/QTBUG-11042

          Target is QtQuick 1.1

          • Sacha
          1 Reply Last reply
          0
          • S Offline
            S Offline
            syrianzoro
            wrote on 12 Dec 2010, 17:03 last edited by
            #5

            *thank you again Mr xsacha

            It might be the flow property in layout Item.... I think so *

            Qt is the future

            1 Reply Last reply
            0

            1/5

            11 Dec 2010, 12:27

            • Login

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