[Solved] How to set color to a tableview values from the database
General and Desktop
5
Posts
3
Posters
1.5k
Views
1
Watching
-
@ 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.