Results 1 to 4 of 4

Thread: how can we select or highlight multiple rows from a current selected row

  1. #1
    Join Date
    Apr 2016
    Posts
    3
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default how can we select or highlight multiple rows from a current selected row

    I need to get code/ tip to select or highlight multiple rows in a table from a currently selected/highlighted row. Could someone help me on this?

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: how can we select or highlight multiple rows from a current selected row

    Check the QItemSelectionModel of the view.

    Cheers,
    _

  3. #3
    Join Date
    Apr 2016
    Posts
    3
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: how can we select or highlight multiple rows from a current selected row

    Could you please explain with an example. I don't have any idea about this



    Regards,
    Joseph

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: how can we select or highlight multiple rows from a current selected row

    Ah, it probably wasn't that obvious, but the QItemSelectionModel in the previous comment is actually a link to the Qt documentation for that class.
    Which contains a link to the Qt model/View documentation, which has this section: http://doc.qt.io/qt-5/model-view-pro...-in-item-views

    Cheers,
    _

Similar Threads

  1. Replies: 0
    Last Post: 14th November 2015, 07:53
  2. Highlight current line in textedit
    By aaditya190 in forum Newbie
    Replies: 2
    Last Post: 22nd November 2013, 16:30
  3. Replies: 4
    Last Post: 6th March 2011, 09:54
  4. QTableView: Select multiple rows?
    By realdarkman71 in forum Newbie
    Replies: 2
    Last Post: 9th December 2010, 21:36
  5. QTableWidget - Select multiple rows.
    By wally in forum Qt Programming
    Replies: 2
    Last Post: 21st October 2008, 17:15

Tags for this Thread

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.