[Solved] How to set color to a tableview values from the database

@ Log cnn;
QSqlQueryModel *modal=new QSqlQueryModel();
QSqlQuery *qry=new QSqlQuery(cnn.mydb);
qry->prepare("select *from AccessLog");
qry->exec();
modal->setQuery(*qry);
ui->tableView->setModel(modal);
qDebug()<<(modal->rowCount());
@
With this method i can set a QSQlQueryModels to my QTableviews.How i can set color to each row in tableview.

And also one method for this solution,In QtCreator UI Forms select the tablview control and change the property of styleSheet. It include the various options such as color,background color,border color etc.