PDA

View Full Version : Reference QTableWidgetItem



regenbiegen
1st February 2007, 11:37
Hi,

can someone help me how to reference the QTableWidgetItem in the following example, because i need to change it's color.

for (i = 0; i < 42; i++)
{
.....
monthTable->setItem( i/7, i%7, new QTableWidgetItem(QString::number(c++)));
......
}

Thank you very much,
regenbiegen

aamer4yu
1st February 2007, 11:56
you can access the item in a tablewidget by the function -


QTableWidgetItem * QTableWidget::item ( int row, int column ) const

regenbiegen
1st February 2007, 12:34
Hello,

thanks for your help. Thats what i was looking for.

Have a nice day,
regenbiegen