Drag and Drop widgets in a display zone

  • I know that widgets in QT accept drag and drop but I don't know how to customize this for my needs.

    I have a display zone where I can drop multiple widgets(QProgress bar, QLabel ..) from a list of draggable widgets "something like Qt designer :) but much easier" . I imagine that the solution must be difficult , specially for beginners like me :) but I need help to try it.
    Any idea?

  • Hi,

    See drag and drop in Qt examples

  • by using following events

    #void dragEnterEvent(QDragEnterEvent *event); 

    void dragLeaveEvent(QDragLeaveEvent *event);

    void dragMoveEvent(QDragMoveEvent *event);

    void dropEvent(QDropEvent *event);

  • thanks a lot !

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.