View Full Version : Why QAbstractItemView::dragEnterEvent is always accepted?
canopen
24th May 2017, 13:17
Why QAbstractItemView::dragEnterEvent doesn't​ check model's canDropMimeData method? This results in incorrect 1-pixel area along widget boundary which is always "positive-drop" without taking into account if model can actually accept data. Is there any workaround?
high_flyer
28th May 2017, 22:28
The docs say:
This function is called with the given event when a drag and drop operation enters the widget. If the drag is over a valid dropping place (e.g. over an item that accepts drops), the event is accepted; otherwise it is ignored.
So, it seems to me its not checking the model's canDropMimeData() since it is going even lower, it asks the item over which the event happens.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.