Hello all,
i have a QTableWidget with 3 rows and 3 columns. When user clicks on a widget (they are widgets not items...) then the whole row in which the widget belongs is selected. For example, if i click on widget on cell (0,0) then the cells (0,0), (0,1) and (0,2) are selected. What i do is to find the row the widget belongs to and then do the following:
table->setSelectionMode(QAbstractItemView::ContiguousSel ection); //in order to select the cells in the same row
table->selectRow( RowWidgetBelongsTo );
table->setSelectionMode(QAbstractItemView::SingleSelecti on); //in order to prevent user from selecting multiple cells
The problem is that if the user presses the "shift" button when he clicks on a cell, then he is able to select multiple cells...
Any ideas?
Bookmarks