Important: Please read the Qt Code of Conduct -

Draggable Popup

  • Hi, how can I achieve a dragable popup, which the user can move around the screen?
    I have a QML component with a MouseArea child using onClicked:


    Popup {
        id: root
        x: 100
        closePolicy: Popup.CloseOnEscape 
        contentItem: GroupBox {
             // * Snip *

    Qt Quick 5.12.10

  • Qt Champions 2018

    Popup are limited to stay inside their parent window for now.

    If you want something that can be moved outside, use a Window and not a Popup.

  • @adaptine hi
    You can define your contentItem like this to move it in your window

     contentItem: Rectangle{
                    anchors.fill: parent
     // the content 

    You could also use a QML Window instead

Log in to reply