How to selecte two rows in qtablewidget?
-
@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?@