PDA

View Full Version : Setting one* column of QTreeView to be editable



forrestfsu
18th October 2006, 21:27
I know how to set an entire treeview to be editable:

ui.treeView->setEditTriggers(QAbstractItemView:: DoubleClicked)

But how do I pick only a specific column to be editable? I only want the user to be able to edit one specific column.

Thanks in advance...

forrestfsu
18th October 2006, 21:30
I found my solution on another post:
http://www.qtcentre.org/forum/f-qt-programming-2/t-qtreeview-qtreewidget-3939.html

jacek
18th October 2006, 21:31
You can control it with QAbstractItemModel::flags(). Only items that have Qt::ItemIsEditable flag set are editable.