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

    • 59f7b30d41b06b1d9da81aea5784d57ecd91ab04

      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
                      }
                  }
              }
          }
      }
      

        1. layout.png
          6 kB
          Krzysztof Piekutowski
        2. main.qml
          0.5 kB
          Krzysztof Piekutowski
        For Gerrit Dashboard: QTBUG-47134
        # Subject Branch Project Status CR V

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes