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

[REG 5.4.0->5.5.0] RowLayout changes order of its elements when inside asynchronous Loader

    XMLWordPrintable

Details

    • 59f7b30d41b06b1d9da81aea5784d57ecd91ab04

    Description

      When RowLayout is loaded asynchronously and is filled by Repeater item that should be first ends up at the end. Code below produces 4 Text items with consecutive numbers starting from 0. Element "0" which should be first is placed in RowLayout as last. The same happens in ColumnLayout.

      import QtQuick 2.4
      import QtQuick.Window 2.2
      import QtQuick.Layouts 1.1
      
      Window {
          visible: true
          width: 100
          height: 50
      
          Loader {
              asynchronous: true
              anchors.fill: parent
              sourceComponent: RowLayout {
                  anchors.fill: parent
                  Repeater {
                      model: 4
                      delegate: Text {
                          text: index
                          Layout.preferredWidth: 5
                          Layout.fillHeight: true
                      }
                  }
              }
          }
      }
      

      Attachments

        1. layout.png
          layout.png
          6 kB
        2. main.qml
          0.5 kB

        Issue Links

          Activity

            People

              ulherman Ulf Hermann
              kpiekutowski Krzysztof Piekutowski
              Votes:
              9 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: