Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
File Drop fails to call QAbstractItemModel::dropMineData but calls QAbstractItemModel::mimeData instead
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.
"You can see the code at the following link":http://stackoverflow.com/questions/18715952/qtreeview-drag-and-drop-fails-to-call-qabstractitemmodeldropminedata-source