Important: Please read the Qt Code of Conduct -

Open Dialog Box Like in QMl on top of all other

  • Hi,

    I have a full qml application done in QML. I need some times to open a dialog box when I click for example on an item of in a listview... Is there a way to open qml component on top of all other : It seems Z is only for child items, and it don't works if you open the component from a subchild item. The only trick I have found is to add the dialog box at the end of the main qml and show/hide it ... it's not elegant at all ..

  • may be this is of help for you "setWindowState":

    From your post it is not clear if this is the only window you want to open. It looks more like you open a dialog and subsequently more windows. However, you like to have the dialog box always staying on top. Is that correct?

  • Try to a have a global popup Loader item with highest z value among all top level items, and see the source and make it visible when you want to open the popup. And do you want to dismiss the popup if user touches outside dialog area?? Liking a blocking (/Model) popup?? If you want this behavior you need to do few tricks with Loader item's MouseArea.. let me know if you want it

    And in your post title, its not QMI, but QML I guess.

  • it's for a full single window QML application... so you confirm that the only way is to have a global popup .... for now, it seems that QML is not "Quick" for a true application... I have the impression to reinvente the wheel everyday !

  • Once we have Qt Quick Components ready, we should have all these widgets come ready-made. And about "should it be a global item", I don't know any other way of doing it. May be there is a way??

Log in to reply