PDA

View Full Version : Help QTableView



vinny gracindo
21st November 2009, 20:45
How do I color the background of a QtableView the odd rows of green? And color even lines of red?

john_god
22nd November 2009, 00:44
I dont know how to set the colors but to distinguish odd from even do something like



for(int i=0;i<10;i++)
{
if ( i%2 == 0) //its even
paint_red();
else // its odd
paint_green();
}