Just want to add some words. If supportedDragActions() returns Qt::MoveAction only, then rows removed when drag&drop from different QListView. But in this case drag&drop doesn't work when dragging internally. I.e. I can't drag item and drop on another place in the same QListView...
2015-09-13 14:00 GMT+03:00 Igor Mironchik <[email protected]>: > Hi, > > Is it possible to set some flags, or something else... that QListView when > dragged row to another QListView do this drag with Qt::MoveAction? > > I have to say that I need handle internal moves too. So in the model I > have: > > Qt::DropActions supportedDragActions() const > > { > > return Qt::MoveAction | Qt::CopyAction; > > } > > > Qt::DropActions supportedDropActions() const > > { > > return Qt::MoveAction | Qt::CopyAction; > > } > > > And default drop action for this QListViews is Qt::MoveAction, and drag&drop > mode is DragDrop. > > > The problem is that while I drag&drop from the same QListView action is > Qt::CopyAction. I handle it in dropMimeData(), all is fine. But when I > drag&drop from another QListView - data is dropped but row don't removes from > that another QListView. > > > How to say QListView when data dropped to another QListView that it should > remove dropped data from itself? > > > Thank you. > >
_______________________________________________ Interest mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/interest
