Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to selecte two rows in qtablewidget?

How to selecte two rows in qtablewidget?

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 632 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    foxgod
    wrote on last edited by
    #1

    @i want to selecte two rows in qtablewidget one time?i use this code ?
    QModelIndex topLeft, bottomRight;
    topLeft = this->model()->index( row, colum, QModelIndex() );
    bottomRight = this->model()->index( row+1, colum, QModelIndex() );
    QItemSelection selection( topLeft, bottomRight );
    this->selectionModel()->select( selection, QItemSelectionModel::Select );
    two rows can be selected,but when i clike one row that is selected one of two rows,onle one row is selected ,how to do that when i clike one of the two selected rows ,two rows is selected remain?@

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved