Drag and Drop between two different QQuickWidgets

  • Hi All,

    I do have two QQuickWidgets created from two different QML files.
    What's the best approach to do drag and drop between the two ?

    Am I forced to create a single QML file ?

    Thanks a lot for all the help,


  • Moderators


    AFAIK, both approaches are possible and it completely depends upon the requirement of your project.

  • Hi there a thank you very much for your reply.
    Would it be possible to point me in the right direction to check out examples of both approaches ?

    Thank you very much for your help,

    Kind regards,


  • Moderators

    If you have Qt installed you can find it under Examples folder
    For eg on my systems its <Qt Installed Dir>Examples/Qt-5.4/quick/draganddrop.
    For QQuickWidget approach, you can create 2 QML files depending upon the mentioned examples and load them in QQuickWidget. It should work with some minor changes.

  • Thanks a lot that realy helped me!
    It worked like a charm within QML but unfortunately I have been unable to do the same between two QQuickWidgets.
    Any Ideas ?

    Thanks a lot,


  • Moderators

    Can you post the sample code that you created ? So that we can understand clearly.

Log in to reply

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