Reputation: 11662
Is it possible to make only one cell (or item) selectable at a time in a QTableWidget
, rather than the default of allowing multiple?
Upvotes: 18
Views: 11365
Reputation: 17535
tableWidget->setSelectionBehavior( QAbstractItemView::SelectItems );
tableWidget->setSelectionMode( QAbstractItemView::SingleSelection );
Upvotes: 30