Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
Hi All
I have created a QTableView & I m using the different table view with same model in 2 different tabs. Here I want set different FLAG property[i.e enable & disable] to my table view located in 2 different tabs. How to achieve this?
Does this solve the problem?
@tableView.setEditTriggers(QAbstractView::NoEditTriggers);@
That works. If you want to have more detailed control, you will need to use a proxy model and modify the editable flags in there.
If you don't use the "setData" on the model, that will be read-only. And don't add the "Qt::ItemIsEditable" to the flags.
[quote author="fluca1978" date="1320833028"]Does this solve the problem?
@tableView.setEditTriggers(QAbstractView::NoEditTriggers);@ [/quote]
I think is
@tableView.setEditTriggers(QAbstractItemView::NoEditTriggers);@