jay
9th September 2008, 12:35
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.
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.
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.
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.