PDA

View Full Version : Disable a specific cell in QStandardItemModel



Omid123
19th January 2015, 11:41
Hi There,
I have made a model with 2 rows and two columns: model = new QStandardItemModel(2,2,this);

I need to make a certain cells inactive (say row 1, col 1).
I can inactive the whole model: ui->tableView->setDisabled(true); but not a certain cell.

appreciate your help.
Omid

anda_skoa
19th January 2015, 12:52
http://doc.qt.io/qt-5/qstandarditemmodel.html#item
http://doc.qt.io/qt-5/qstandarditem.html#setEnabled

Cheers,
_