PDA

View Full Version : Making all rows nonselectable of a tablewidget.



Niamita
24th February 2012, 05:21
Hi all

i am adding rows in a table at run time, in which each cell contain different widgets. I want to make all rows widget disable or make rows nonselectable when i select a particular row.

I am getting right way to do this.

Thanks.

Lykurg
24th February 2012, 06:43
See QAbstractItemView::SelectionMode.

Niamita
24th February 2012, 07:10
Thanks for response, but i have widgets in each column of a row in table.

Lykurg
24th February 2012, 07:29
Ok, have you tried to set the QWidget::focusPolicy of the widget to Qt::NoFocus?

AlexSudnik
24th February 2012, 08:10
Why not to use void QTableWidget :: cellChanged ( int row, int column ) , signal for items' access.

Edit : Haven't noticed "tablewidget" in the topic's name^^