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
417 posts

This link [doc.qt.nokia.com] and this example [doc.qt.nokia.com] may help you :-)

 Signature 

Anselmo L. S. Melo (anselmolsm)
www.anselmolsm.org

December 7, 2010

Franzk Franzk
Lab Rat
837 posts

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

 Signature 

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

http://www.catb.org/~esr/faqs/smart-questions.html

 
  ‹‹ [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!