Results 1 to 4 of 4

Thread: QDirModel and QColumnView question

  1. #1
    Join Date
    Oct 2007
    Posts
    16
    Thanks
    3
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Question QDirModel and QColumnView question

    Hello,
    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.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QDirModel and QColumnView question

    Could you describe what you mean by "similar to Win Explorer"?

  3. #3
    Join Date
    Oct 2007
    Posts
    16
    Thanks
    3
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default Re: QDirModel and QColumnView question

    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

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: QDirModel and QColumnView question

    ExtendedSelection behaves for me exactly how you describe it... At least it used to, I haven't used it for a while.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.