How to disable click in column tableWidget?
-
Hi,
The usual way is to make the model's flag method return at least
Qt::ItemIsSelectableremoved.Depending on the model you use, you can set the flag on the item or subclass the and reimplement flags or even have a proxy model that does that.
-
Hi,
The usual way is to make the model's flag method return at least
Qt::ItemIsSelectableremoved.Depending on the model you use, you can set the flag on the item or subclass the and reimplement flags or even have a proxy model that does that.
-
@e-ferro you may have similar code to create this column
for ( int idx = 0; idx < m_tableWidget->rowCount(); ++idx ) { auto table_item = new QTableWidgetItem( QString::number( idx + 1 ) ); table_item->setFlags( table_item->flags() & ~Qt::ItemIsSelectable ); m_tableWidget->setItem( idx, 0, table_item ); }

