Important: Please read the Qt Code of Conduct -

ComboBox is empty when loaded by asynchronous Loader

  • 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.0

    Rectangle {
    width: 360
    height: 160
    Row {
    Button {
    text: "Load Combobox"
    { = true
    CheckBox {
    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?

  • How do you release "cbPage" loaded by the loader before you load "cbPage" again by loader?

Log in to reply