Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Make Independent Popup



  • I have an app which is small in terms of width and height, I want a popup to show when a button is clicked. Problem is the popup is larger than the app window and when i open it, it scales down and looks weird

    APP
    f572d9c0-7ff4-4797-b5de-84c68b456dc4-image.png

    APP WITH POPUP
    7824844e-c884-484a-9f33-e14fb00c2d73-image.png

    POPUP CONTENT IN DESIGNER
    24317906-ffa6-4132-bf03-aac773542d7f-image.png

    How can i make the popup independent from the app window, like this:
    33c43137-9827-4f18-9afc-8c49c3c323c6-image.png

    Or is there a better approach rather than using popup, it would be nice if i were able to move the popup/window around.


  • Qt Champions 2018

    Use a Window instead of a Popup.



  • It has to still be a child of the app itself because it needs some data from it


  • Qt Champions 2018

    Use a Window instead of a Popup.



  • @GrecKo Thanks

    I've gotten it sorted out. I encapsulated the component i wanted to show inside a window and created it using Qt.createComponent()

    var playListComponent = Qt.createComponent("CustomPlaylist.qml")
    var window = playListComponent.createObject(rootWindow)
    window.show()
    

    The root element of CustomPlaylist.qml is a Window
    8b13d557-b014-413f-bbfc-efda46c9a1d6-image.png


Log in to reply