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

Customized Qt.labs ComboBox won't display in an asynchronous Loader

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2: Important
    • None
    • 5.6
    • Quick: Controls 2
    • None
    • Windows 7
      QtCreaor 3.6.1
      Qt 5.6.0
      But doesn't seem to be environment related

    Description

      I'm trying out the Technical Preview of the QtQuick.Controls 2.0 known at the moment as Qt.labs.controls 1.0.

      As you can easily customize those new controls, putting a customized ComboBox in an asynchronous Loader makes it to not appear at all, printing this message in the console :

      qrc:/main.qml: Object destroyed during incubation
      

      This is quite inconvenient as a similar bug existed in Qt 5.5.0.
      This might be related to this unresolved bug (Controls 1.0)

      I found out that customizing any of the available properties (even separately) triggers the bug, exception for delegate.

      Here's minimal code to reproduce the bug :

      import QtQuick 2.6
      import Qt.labs.controls 1.0
      
      ApplicationWindow {
          id: root
          visible : true
          width   : 640
          height  : 480
      
          property bool  triggerTheBug: true // Swap this to see a normal display of the ComboBox
      
          StackView {
              id: myStackView
              anchors.fill: parent
              initialItem: Loader {
                  anchors.fill: parent
                  asynchronous    : triggerTheBug
                  sourceComponent :
                      ComboBox { popup      : Popup{} }         // BUG
                  //ComboBox { background : Rectangle{} }     // BUG
                  //ComboBox { contentItem: Rectangle{} }     // BUG
                  //ComboBox { delegate   : ItemDelegate{} }  // NO BUG
              }
          }
      }
      

      I attached a .zip file with extended code proving that my customizations works well when using a standard Loader.

      If you try out the attached example, you'll also notice that for a standard ComboBox in an asynchronous Loader, the first element of the model won't show upon completion of the component, you need to select it yourself.

      Attachments

        Issue Links

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

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              Coding_Eric Eric Barral
              Votes:
              5 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes