Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. [SOLVED] Drop into a QDeclarativeView doesn't work

[SOLVED] Drop into a QDeclarativeView doesn't work

Scheduled Pinned Locked Moved QML and Qt Quick
3 Posts 2 Posters 2.4k Views
  • 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 Offline
    F Offline
    frankiefrank
    wrote on last edited by
    #1

    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
    0
    • M Offline
      M Offline
      mbrasser
      wrote on last edited by
      #2

      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
      0
      • F Offline
        F Offline
        frankiefrank
        wrote on last edited by
        #3

        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
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved