QFileSystemModel and QTreeView with drag-drop/rename/delete
-
I have a QFileSystemModel and QTreeVIew working well as a basic directory browser filtering certain file names.
Is it possible to make it behave like the left side of a file dialog or basic explorer, so that I can drag/drop folders and affect the underlying file-system, as well as right click to rename and delete? Or do I have to piece all these functions together by hand to give those basic file management functions? -
Hi and welcome to devnet,
IIRC, you must disable QFileSystemModel's readOnly property and it should work.
Hope it helps
-
You're welcome !
It's explained in the documentation "here":http://qt-project.org/doc/qt-5/model-view-programming.html#using-drag-and-drop-with-item-views