Hi!

please, help me in the problem.

In the cell (database) is true or false.. when true, the background collor should be green, when false, shoulde be red (in qtablewidget).

I'm using qsqltablemodel for set table in qtablewidget:

Qt Code:
  1. model->setTable("table1");
  2. model->setFilter("id = " + grp.id);
  3. model->setHeaderData(1,Qt::Horizontal, tr("ID"));
  4. model->setHeaderData(2,Qt::Horizontal, tr("NOME"));
  5. model->setHeaderData(3,Qt::Horizontal, tr("STATUS"));
  6. model->select();
  7. tableview->setModel(model);
To copy to clipboard, switch view to plain text mode 

Guys, how to set background color in the cell 'STATUS' ?

regards