ComboBox is empty when loaded by asynchronous Loader
-
wrote on 18 Dec 2013, 18:55 last edited by
Hi,
I am using an asynchronous Loader to load Qml components on demand.
When using ComboBox (QtQuick.Controls) in the loaded component, the combobox popup is empty and very small (about 1x1 px). It looks like the model is not used at all.Here is a small example:
@import QtQuick 2.0
import QtQuick.Controls 1.0Rectangle {
width: 360
height: 160
Row {
Button {
text: "Load Combobox"
onClicked:
{
loader.active = true
}
}
CheckBox {
id:asyncCheckbox
checked: true
text: "asynchronous"} } Loader { id: loader asynchronous: asyncCheckbox.checked active: false anchors.centerIn: parent sourceComponent: cbPage } Component { id: cbPage ComboBox { width: 200; model: [ "Banana", "Apple", "Coconut" ] } }
}@
Note that you can only load once and have to restart the application to load again.
I am using Qt 5.1.1.Is this a bug in Qt?
-
wrote on 22 Dec 2013, 10:55 last edited by
How do you release "cbPage" loaded by the loader before you load "cbPage" again by loader?
1/2