How to make te selected columns of QTableWidget as ReadOnly
General and Desktop
2
Posts
2
Posters
5.5k
Views
1
Watching
-
You can set the items in the even columns to read only like this:
@
QTableWidgetItem *twItem = tableWidget->item(3, 4);
twItem->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
// if you do not need selectable items this is ok:
twItem->setFlags(Qt::NoItemFlags);
@Or set the flags during creation of the items, of course.