Results 1 to 2 of 2

Thread: How to keep multi-selection in QTreeView?

  1. #1
    Join Date
    Feb 2009
    Location
    Chengdu, China
    Posts
    8
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Question How to keep multi-selection in QTreeView?

    Hello,

    Here is a QTreeView, first & second columns are text, the third column is a push button.
    1.JPG

    The requirement is: If multi-select the rows, and then click one "Download" button, all the selected items can be downloaded. And the multi-selected rows still keep selection.

    Currently: The download function has been implemented. But if I click one "Download" button, the row with the button clicked is selected, other rows are not selected.

    Question:
    How can I keep the selection after click the "Download" button? Thanks!

    Hope somebody can help me. Thanks again.
    Last edited by wysota; 8th April 2011 at 10:08.

  2. #2
    Join Date
    Jul 2010
    Location
    Indonesia
    Posts
    83
    Thanked 17 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Maemo/MeeGo

    Default Re: How to keep multi-selection in QTreeView?

    Hi,
    Maybe the selection model (QItemSelectionModel) of your view might help your problem.

Similar Threads

  1. QComboBox multi-column popup selection quirks [SOLVED]
    By ChrisW67 in forum Qt Programming
    Replies: 4
    Last Post: 24th January 2011, 02:56
  2. Multi Column selection from a Sqlite table
    By nagabathula in forum General Programming
    Replies: 34
    Last Post: 3rd January 2011, 15:50
  3. QTreeView and multi-select of rows
    By QPlace in forum Qt Programming
    Replies: 1
    Last Post: 27th October 2008, 02:32
  4. QListWidget multi selection
    By user in forum Qt Programming
    Replies: 1
    Last Post: 6th February 2008, 07:36
  5. Multi-selection Combo Box
    By EricF in forum Qt Programming
    Replies: 7
    Last Post: 7th November 2007, 07:15

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.