Results 1 to 2 of 2

Thread: QTreeView and multi-select of rows

  1. #1
    Join Date
    Jul 2007
    Posts
    121
    Thanks
    38
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default QTreeView and multi-select of rows

    I have built slightly modified example of TreeView in QT4.5 technology preview. Modification did not change any classes, just internal data of treeview item class. I populated the model with 4 items that look like that;

    Item1
    |
    Item2
    Item 3
    Item 4

    where Item 1, Item3 and Item 4 are childs of "root" item and Item 2 is a child item of Item1.
    Now, when I am selecting Item 3 or Item 4 treeview behavies normally, which is that previously selected item is unselected and newly selected item is highlighted.
    However, when I select Item1 or Item2 _both_ of them become selected.

    Selection properties of TreeView appears to be set to allow single selection only.

    My question is: How to make items and their child items selected as individual rows?

  2. #2
    Join Date
    Jul 2007
    Posts
    121
    Thanks
    38
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QTreeView and multi-select of rows

    I apologize for posting. My bad - the problem was in the parent-child relationship.

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.