此问题已经解决 谢谢大家协助
贴上代码 以便日后查找 和 有遇到同类问题的同仁们~~
void paint( QPainter *p, const QColorGroup &cg, const QRect &cr, bool se lected )
108 {
109 QColorGroup g( cg );
110 if ((col()!=0)&&(selected==false))
111 {
112 g.setColor( QColorGroup::Text, red );
113 QTableItem::paint( p, g, cr, selected );
114 }
115 else
116 QTableItem::paint(p,cg,cr,selected);
117 }