problem while dropping into QTableView
Dear all,
I am using QTableView+QDirModel for displaying local file system files and folders.
at first, it is showing all Drives using "model->setRootIndex("/");".
If a row in the table is double clicked, I am displaying clicked folder contents. again I am using
"setRootIndex(clicked path)" method.
I have enabled Drag and Drop for this View and also reimplemented Drag and Drop related functions in the MyDirModel class. In the same way flags function is also reimplemented by returning the below flags.
Quote:
return Qt::ItemIsEnabled | Qt::ItemIsDragEnabled | Qt::ItemIsDropEnabled;
My problem is,
This view is accepting drops only if the "/" contents were in display.
it is not accepting drops when all other path's contents were displayed.
Please any one help me.
Thanks.
Re: problem while dropping into QTableView
Could you provide a minimal compilable example reproducing the problem?
1 Attachment(s)
Re: problem while dropping into QTableView
Dear wysota,
I have attached a Zip file contains 4 files.
I am using
Qt 4.4.0 in windows.
Thanks you.
Re: problem while dropping into QTableView
For QDirModel, it is enough to setReadOnly(false) to enable drag and drop functionality. See [WIKI]Extended Dir View example[/WIKI] for more details.