Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    [SOLVED] Drop into a QDeclarativeView doesn't work

    QML and Qt Quick
    2
    3
    2208
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F
      frankiefrank last edited by

      I want to be able to drag data on top of my QDeclarativeView and when it's dropped make some things happen in the QML.

      I set setAcceptDrops(true) on my QDeclarativeView but still when trying to drag I get the no drop mouse cursor.

      Could anyone please help out with some basic code for this behavior? Or at least point me to the right direction?

      "Roads? Where we're going, we don't need roads."

      1 Reply Last reply Reply Quote 0
      • M
        mbrasser last edited by

        Hi,

        The qmlviewer application implements drag-and-drop for the view; if you'd like to refer to the source it is implemented in tools/qml/qmlruntime.cpp.

        Regards,
        Michael

        1 Reply Last reply Reply Quote 0
        • F
          frankiefrank last edited by

          Thank you. I'll check that out.

          UPDATE: checked it out, and it sure does work. Thanks for the tip.

          "Roads? Where we're going, we don't need roads."

          1 Reply Last reply Reply Quote 0
          • First post
            Last post