View Full Version : QDirModel and QColumnView question

11th April 2008, 22:12
I am using QDirModel with QColumnView and having problem with selection behavior in the view. I would like to have standard Win Explorer selection behavior. I am using QAbstractItemView::ContiguousSelection SelectionMode and according the documentation, it should behave similar to Win Explorer. But that is not the case. Could somebody help me, please. It is QT 4.3.1.

11th April 2008, 22:33
Could you describe what you mean by "similar to Win Explorer"?

11th April 2008, 22:47
When the user selects an item in the usual way, the selection is cleared and the new item selected. However, if the user presses the Ctrl key when clicking on an item, the clicked item gets toggled and all other items are left untouched. If the user presses the Shift key while clicking on an item, all items between the current item and the clicked item are selected or unselected, depending on the state of the clicked item.
Exactly, how it is described in QT documentation for QAbstractItemView::ExtendedSelection.
I tried this mode and it did not behaved as it described. But... it behaved as described in QTreeView. So, I suspect it is QColumnView issue. And I would like to find the solution before tomorrow night. So, help me please :D

11th April 2008, 22:56
ExtendedSelection behaves for me exactly how you describe it... At least it used to, I haven't used it for a while.