I have a custom QTreeWidget class with the dropEvent()
method overridden.
Here is the method:
void QCustomTreeWidget::dropEvent(QDropEvent * event)
{
QModelIndex droppedIndex = indexAt(event->pos());
if (!droppedIndex.isValid())
return;
// other logic
QTreeWidget::dropEvent(event);
}
How can I determine if the item will be inserted above, inside or below the item on which it is dropped?