PDA

View Full Version : getting "QFile::rename: Empty or null file name" when dropping file to QTreeview



ashish18
22nd July 2015, 14:20
Hi QT,

I have QSplitter of which left side is Qtreeview for showing local system file using QFileSystemModel and right side have QWebview with html page where i am showing directory and file name line by line returning by some Api and i want to make drag and drop application. I have enable the all drag drop required function so its working internally on its own view. But i want to drag and drop between these two view , when i am doing its showing plus icon correctly but when dropping the file its showing
"QFile::rename: Empty or null file name" in the console. So please help me i am very knew to QT.
Thanks

ChrisW67
22nd July 2015, 22:01
The QFileSystemModel has default behaviours for drops, which I expect is triggering the message you see. You will need to replace this default behaviour or make sure the dropped item carries suitable MIME data for a file system.