Results 1 to 2 of 2

Thread: QTableView select a whole row?

  1. #1
    Join Date
    Mar 2010
    Location
    Heredia, Costa Rica
    Posts
    257
    Thanks
    24
    Thanked 17 Times in 14 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default QTableView select a whole row?

    Hi,

    In a QTableView how can I select a whole row for a given index? Or how can I highlight a set of indexes?

    If it is with QItemSelectionModel how can I make it to select the whole row?

    Thanks a lot!
    Carlos.

  2. #2
    Join Date
    Feb 2011
    Location
    Romania
    Posts
    53
    Thanks
    1
    Thanked 11 Times in 9 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QTableView select a whole row?

    See QAbstractItemView::SelectionBehavior. You can use
    Qt Code:
    1. QAbstractItemView::SelectRows
    To copy to clipboard, switch view to plain text mode 

  3. The following user says thank you to cincirin for this useful post:

    qlands (22nd August 2011)

Similar Threads

  1. Replies: 1
    Last Post: 4th May 2011, 19:31
  2. QTableView: Select multiple rows?
    By realdarkman71 in forum Newbie
    Replies: 2
    Last Post: 9th December 2010, 21:36
  3. How select next row in QTableView
    By estanisgeyer in forum Qt Programming
    Replies: 8
    Last Post: 17th June 2009, 20:02
  4. Select row in QTableView after insert.
    By fede in forum Newbie
    Replies: 1
    Last Post: 14th April 2009, 15:18
  5. How to select a cell in a QTableView
    By JeanC in forum Qt Programming
    Replies: 6
    Last Post: 6th February 2008, 13:20

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.