December 7, 2010

mg444 mg444
Lab Rat
1 posts

Set background color of a table cell


Hello –

I’m trying to figure out a way to set the background color of a table cell within a QTableView. I’m using Qt 4.7.1. Could somebody help?

Thank You.

2 replies

December 7, 2010

anselmolsm anselmolsm
Ant Farmer
384 posts

This link [] and this example [] may help you :-)


Anselmo L. S. Melo (anselmolsm)

December 7, 2010

Franzk Franzk
Lab Rat
833 posts

Or you provide a Qt::BackgroundRole in our models data() function.


“Horse sense is the thing a horse has which keeps it from betting on people.”—W.C. Fields

  ‹‹ [solved]Writing hex string to file      Resizing the Tablewidget column is crashing the application ››

You must log in to post a reply. Not a member yet? Register here!