Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. File Drop fails to call QAbstractItemModel::dropMineData but calls QAbstractItemModel::mimeData instead
Forum Updated to NodeBB v4.3 + New Features

File Drop fails to call QAbstractItemModel::dropMineData but calls QAbstractItemModel::mimeData instead

Scheduled Pinned Locked Moved General and Desktop
3 Posts 1 Posters 936 Views 1 Watching
  • 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.
  • Q Offline
    Q Offline
    qt_manu
    wrote on last edited by
    #1

    Hi,

    I am building an app with a qTreeview and I created a model which derives from QAbstractItemModel. I can manipulate the tree by dropping a file (dragging a file from outside of the app into the app) and drag-and-drop items within the tree.

    The problem is that the file drop into the app doesn't always work since I re-implemented the function mimeData(const QModelIndexList &indexes). Sometimes and only when there is a selected item in the tree (which provides a valid item index to the function mimeData), the file drop doesn't work because the function mimeData is called (and returns true) but the function dropMimeData is never called.

    It looks like that the function mimeData should not be called during the file drop as the application knows already the mimeData format: text/uri-list.

    Does anybody has the same issue or have any thoughts on this? Again it is not like if it was not working at all, it only fails some of the time.

    Any help or thoughts would be great.

    Cheers.

    1 Reply Last reply
    0
    • Q Offline
      Q Offline
      qt_manu
      wrote on last edited by
      #2

      "You can see the code at the following link":http://stackoverflow.com/questions/18715952/qtreeview-drag-and-drop-fails-to-call-qabstractitemmodeldropminedata-source

      1 Reply Last reply
      0
      • Q Offline
        Q Offline
        qt_manu
        wrote on last edited by
        #3

        @
        @

        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