I have a class that extends from QTreeView, which has a data model that extends from QAbstractItemModel, and I want to drag an element to it.
My problem is that when I drag, my drag indicator is displayed, and it displays either a rectangle that needs to be dropped on the element, or a line that needs to be deleted between the elements. However, when I get dropMimeData in my data model, I see no way to get this data. I noticed that QAbstractItemView has dropIndicatorPosition, but it is protected. So my question is: how can I find out in dropMimeData if the drop is on the element, before or after it?
source
share