Important: Please read the Qt Code of Conduct -

Loader element and CommonDialog element

  • I am trying to speed up my qml page loading. Currently I have some(3 or 4) CommonDialog in my MainPage. I use when I need them. However, since I am concerning the loading speed of my app, is that better to turn the dialogs to components and using a loader when I need them.
    My worry is that I am not sure if it is necessary. In my opinion, the CommonDialog element is not loading as soon as they construct, so maybe the qt component builders have already consider this, so I need not to do it myself?
    Turning CommonDialog into Loader is just simply
    Page { id: mainPage
    Loader { id: dialogLoader }
    Component {
    id: dialog01
    CommonDialog { //define a dialog }
    Rectangle { id: mainRect
    anchors.fill: parent
    MousrArea { anchors.fill: parent
    onClicked: dialogLoader.sourceComponent = dialog01

Log in to reply