[Qt-interest] Setting a different drop action on a QDropEvent is ignored in a QAbstractItemView (Bug?)
Stephen Kelly
steveire at gmail.com
Thu Dec 18 21:25:18 CET 2008
Hi,
I am working on a custom model and view based on
Akonadi::Collection{Model,View}:
http://websvn.kde.org/trunk/KDE/kdepimlibs/akonadi/collectionview.cpp?view=markup
I'm hitting a problem in dropEvent in the view. The dropAction is set to
Qt::MoveAction, and the event is passed down to the QTreeView. The problem
is that the event->proposedAction is not changed from Qt::CopyAction. This
is as described in the docs:
http://doc.trolltech.com/4.4/qdropevent.html#dropAction
The problem is that QAbstractItemView::dropOn uses:
if (model->supportedDropActions() & event->proposedAction()) {
to determine how to deal with the drop. I think it should use:
if (model->supportedDropActions() & event->dropAction()) {
to allow changing the event action. Is this a Qt bug, or am I missing
something?
Thanks,
Steve.
More information about the Qt-interest-old
mailing list