Hi,
sorry, I didn't mention it, but dropping to view should be enabled.
I have QListView attached to QFileSystemModel. I would like to drag&drop files from/to this view, but I I want to forbid moving of icons within the view only(changing their positions in view).

possible solution could be: returns icon to its original position if it was dropped to the same view and it was not dropped to some element(I want overwrite file if it was dropped to other file or copy file to folder if it was dropped to folder)

@chabo said:
If you have override then dropEvent/dropEnter
you can check for the source of the event.
if event->source() == this then reject
else accept
Yes same as your idea, but just forbid the actual drop so
no need moving it back.

Please use the Topic Tools button to mark as Solved and
Upvote the answer(s) that helped you to solve the issuepostimage.org can be used for screenshots.