PDA

View Full Version : How to set colors for everyvalue of array in list????



naufalahad
25th November 2011, 10:49
Hi All,
I am developing an application in which i am declaring an array and get the parse value for it. In which i have to set different colors for every individual values,

Here is the lines of code:

for(int i=0 ; i<name.count(); i++)
{
QString Name = name;
QString Tips = tips[i];
QString City = city[i];
QString Time = time[i];

strList << Name + "\n" + City + "\n" + Tips + "\n" + Time;
}
ui->listWidgetmyprofile->addItems( strList );


I want to set individual colors for name,city,tips and time.
Is there any coding or properties that is to be set for that??

Thanks in advance and Regards,
Naufal.A