PDA

View Full Version : Editable cells in QTableView



TheRonin
29th November 2006, 16:57
I'm working with a QTableView and a QStandardItemModel and would like to make only certain cells editable. Is there any way of doing this? Modifying the EditTriggers seems to give me all or nothing which is a bit too coarse for my taste.

Thanks in advance.

jpn
29th November 2006, 17:39
Either override QAbstractItemModel::flags() or in case you use QStandardItems you may use QStandardItem::setFlags() (QStandardItem was introduced in Qt 4.2).