Drag&Drop using QFileSystemModel.
I have a widget containing 2 QTableView. each has QFileSystemModel object as model.
I want to have a possibility of copying files from one view to another using drag&drop.
I have set this for both views:
tableView_ -> setDragEnabled(true); tableView_ -> setAcceptDrops(true); tableView_ -> setDropIndicatorShown(true);
then I reimplemented those methods(Do I really need it?):
void dropEvent(QDropEvent *event);
void dragMoveEvent(QDragMoveEvent *event);
void dragEnterEvent(QDragEnterEvent *event);
items on the view are dragging ok but when i drop it it doesn't copy anything and does nothing. how can I use QFileSystemModel D&D then I have QTableView. What I have to do?
Have you tried to set
to false. Doc says its default
I dont think you need to implement dropXXX
Thank you that is ok now.
so it can copy files on its own ?
Doc hinted it, but I was not sure.