Qt Reference Documentation

QML Flow Element

The Flow item arranges its children side by side, wrapping as necessary. More...

Inherits Item

  • List of all members, including inherited members
  • Properties

    Detailed Description

    The Flow item positions its child items so that they are side by side and are not overlapping.

    Note that the positioner assumes that the x and y positions of its children will not change. If you manually change the x or y properties in script, bind the x or y properties, use anchors on a child of a positioner, or have the width or height of a child depend on the position of a child, then the positioner may exhibit strange behaviour. If you need to perform any of these actions, consider positioning the items without the use of a Flow.

    Items with a width or height of 0 will not be positioned.

    See also Grid and Positioners example.

    Property Documentation

    This property holds the transition to apply when adding an item to the positioner. The transition will only be applied to the added item(s). Positioner transitions will only affect the position (x,y) of items.

    An object is considered to be added to the positioner if it has been created or reparented and thus is now a child or the positioner, or if the object has had its opacity increased from zero, and thus is now visible.


    This property holds the flow of the layout.

    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.

    move : Transition

    This property holds the transition to apply when moving an item within the positioner. Positioner transitions will only affect the position (x,y) of items.

    This can happen when other items are added or removed from the positioner, or when items resize themselves.

     Flow {
         id: positioner
         move: Transition {
             NumberAnimation {
                 properties: "x,y"
                 ease: "easeOutBounce"
             }
         }
     }

    spacing : int

    spacing is the amount in pixels left empty between each adjacent item, and defaults to 0.


    X

    Thank you for giving your feedback.

    Make sure it is related to this specific page. For more general bugs and requests, please use the Qt Bug Tracker.