[Qt-interest] QTableWidgetItem setForeground & setBackground not working in 4.6.0 on Win7 64 bit

Tony Rietwyk tony.rietwyk at rightsoft.com.au
Tue Nov 29 07:14:46 CET 2011


Hi Everybody, 

I've been asked to add extra columns to our QTableWidget based grids.  In
order to differentiate the new columns, I want to change the color of them.
Yet calling setForeground or setBackground on the items doesn't seem to
work!  

QTableWidgetItem does not have a setStyleSheet, which is the usual way of
getting around QPalette changes that don't work on widgets.  

Am I missing something?  

Thanks, 

Tony.





More information about the Qt-interest-old mailing list