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

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.5.0, 5.6
    • Fix Version/s: 5.7.0 Alpha
    • Labels:
      None
    • Environment:
      Fedora 20, Android 5.0.1, Kubuntu 15.04, Windows 8.1 with Qt 5.5.0
    • Commits:
      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

          For Gerrit Dashboard: QTBUG-47134
          # Subject Branch Project Status CR V

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes