Re: QTableWidget with checkboxes.
Hi guys,
I have a QTableWidget with checkboxes in the 1st column. I have a button to 'select all' which is implemented,
Code:
for(int i = 0; i < tableWidget->rowCount(); i++) {
twi->setCheckState(Qt::Checked);
}
I'm finding that the 1st checkbox in my table doesnt get properly updated. (Subsequently checking on another row cause it to be displayed properly). I tried calling
Code:
tableWidget->repaint
afterwards but this doesnt fix my problem.
I'm sure I'm doing something dumb, (1/2 asleep due to new baby), any help appreciated.
Cheers,
Chris.
Added after 22 minutes:
Answering my own questions.
Theres a bug in Qt http://bugreports.qt.nokia.com/browse/QTBUG-5042
To resolve I call
Code:
tableWidget->verticalHeader()->show();
tableWidget->verticalHeader()->hide();