how to move one file to another dir by using treeview(QFilesystemmodel)
-
wrote on 20 Jun 2021, 15:48 last edited by
I am using the treeview as the view to search file in rootdir. but as a noob , I cant apply drag and drop function to drag one file item to another dir,or rename delete file at treeview .as I using the ui file to load the uiform I cant override the treeview function. is it possible to make it happen without override the function? or just set in the Qdesigner software.
-
Hi,
The model is by default read-only. You can change that using the setReadOnly method.
-
Hi,
The model is by default read-only. You can change that using the setReadOnly method.
-
That is two questions.
The same you do in your file explorer, using modifier keys. Usually alt if memory serves well.
You can connect the customContextMenuRequested signal after setting the contextMenuPolicy.
-
wrote on 21 Jun 2021, 01:13 last edited by
thanks very much but the alt key with mouse drag seems not work
-
Did you check the other modifier keys ?
1/6