All pastes #13039 Raw Edit

Someone

public text v1 · immutable
#13039 ·published 2005-05-31 19:16 UTC
rendered paste body
void ColorListViewItem::paintCell( QPainter *p, const QColorGroup &cg,
                                 int column, int width, int alignment )
{
 

  QColorGroup _cg( cg );
  QColor c1 = _cg.text();
  QColor c2 = _cg.base();

// text_color and background_color are variables stored locally in the derived 
// ColorListViewItem class

  _cg.setColor( QColorGroup::Text, text_color );
  _cg.setColor( QColorGroup::Base, background_color );

  QListViewItem::paintCell( p, _cg, column, width, alignment );

  _cg.setColor( QColorGroup::Text, c1 );
  _cg.setColor( QColorGroup::Base, c2 );

}