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

ComboBox + Loader in async mode = wrong model ordering

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • 5.6.0 RC
    • 5.5.1
    • Quick: Controls 1
    • None
    • Windows

    Description

      All in summary. The ordering of model elements is wrong after executing the app. Example:

      import QtQuick 2.5
      import QtQuick.Window 2.2
      import QtQuick.Controls 1.4
      
      Window {
        visible: true
      
        Loader {
          anchors.fill: parent
          asynchronous: true
      
          sourceComponent: ComboBox {
            model: ListModel {
              ListElement {text: "1"}
              ListElement {text: "2"}
              ListElement {text: "3"}
              ListElement {text: "4"}
            }
          }
        }
      }
      

      The same code that uses QtQuick ListView against ComboBox control didn't cause the problem.

      import QtQuick 2.5
      import QtQuick.Window 2.2
      import QtQuick.Controls 1.4
      
      Window {
        visible: true
        width: 400; height: 400
      
        Loader {
          anchors.fill: parent
          asynchronous: true
      
          sourceComponent: ListView {
            id: listView
            delegate: Text {
              width: listView.width
              height: 30
              horizontalAlignment: Text.AlignHCenter
              verticalAlignment: Text.AlignVCenter
              text: value
            }
      
            model: ListModel {
              ListElement {value: "5"}
              ListElement {value: "10"}
              ListElement {value: "20"}
              ListElement {value: "50"}
            }
          }
        }
      }
      

      And last thing: the problem appears on more than one PC

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            krzysztoff7 Krzysztof
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes