Details
-
Bug
-
Resolution: Duplicate
-
P2: Important
-
None
-
5.6
-
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
- duplicates
-
QTBUG-50992 QQC2: Object destroyed during incubation
- Closed
- relates to
-
QTBUG-52096 Qt Quick Controls 2 Button fails creation in GridView
- Closed
-
QTBUG-52955 Regression: ItemDelegate with overriden contentItem in ListView fails to create on Android
- Closed
For Gerrit Dashboard: QTBUG-53496 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
161723,2 | WIP: Ugly workaround for "Object destroyed during incubation" issues | 5.7 | qt/qtquickcontrols2 | Status: ABANDONED | -2 | 0 |
162519,3 | WIP: Cancel incubation of replaced delegates | 5.7 | qt/qtquickcontrols2 | Status: DEFERRED | -2 | 0 |
162520,3 | WIP: Allow canceling incubation | 5.7 | qt/qtdeclarative | Status: ABANDONED | -2 | 0 |