[Solved]Color a QTableWidget cell
-
wrote on 11 Oct 2010, 13:44 last edited by
I'm trying to color a cell from a QTableWidget but it seams that I'm doing something wrong because is not working( fails silently ), what is my mistake?
@QTableWidget* tableWidget = new QTableWidget( parent );
tableWidget->setRowCount( 8 );
tableWidget->setColumnCount( 10 );QColor color( Qt::red );
tableWidget->item( 0, 0 )->setBackgroundColor( color );@ -
wrote on 11 Oct 2010, 13:55 last edited by
Found the problem, it was needed to cal tableWidget->setItem( 0,0, tableItem ) to add an item to tableWidget
1/2