Qt-interest Archive, December 2006
Re: QTable::paintCell()
Message 1 in thread
Nobody else feel like jumping in here?
Currently trying this w/ no love. Before, I inserted QTableItems... now
I'm just using setText in the cells directly.
Still black on white.
for ( int i = 0; i < upd.size()-1; i++ ) { // upd is a QStringList
QPainter p( this );
QColorGroup cg;
cg.setColor( QColorGroup::Background, Qt::red );
cg.setColor( QColorGroup::Text, Qt::green );
QRect rect = tbl->cellRect( 0, i );
tbl->paintCell( &p, 0, i, rect, FALSE, cg );
tbl->setText( 0, i, upd[i] );
}
--
[ signature omitted ]