PDA

View Full Version : How to Set TableWidget to readonly/non-editable



arunvv
5th February 2008, 01:22
How a TableWidget /TableWidgetItem can be made to readonly / non-editable?

Thanks & Regards,
Arun

ashukla
5th February 2008, 05:22
How a TableWidget /TableWidgetItem can be made to readonly / non-editable?

Thanks & Regards,
Arun
See the link http://www.qtcentre.org/forum/f-qt-programming-2/t-how-to-set-a-column-readonly-in-qtablewidgetitem-9762.html
hope its help.

arunvv
6th February 2008, 00:42
I have one more query ?
How to set particular TableWidget cell for given row, column to read only, instead of whole table.
I want to set some of the cells to read only, and other cells open to read/write.

Thanks & Regards,
Arun.

jpn
6th February 2008, 07:38
Just like it is advised in that thread; use QTableWidgetItem::setFlags().

luf
6th February 2008, 14:15
You might also want to look at the model/view approach if you are viewing data differnt than it is stored.