Hi,
A small, but annoying problem with colors in Qt 4.2.3.
I have a QWidgetTable that contains 3 colums of QWidgetTableItems and several rows. I want to have the last column's text to be in different color, and changed depending of the value. When the row is not selected this works ok with the SetForeground() -function, and giving it a QBrush. However, since the user can select entire row from the table, one row will always be highlighted, and the last column item's colorsettings do not apply anymore for this highlighted row.
How I can set the HighlightedText color for the QWidgetTableItem, without changing the highlight background color (I want to have the whole row highlighted, and the last column text to not change color)? This would be easy if the QWidgetTableItem could be given a normal QPalette, but it seems you can give only QBrush and only for background/foreground roles.
If I have to make an own subclass of the QWidgetTableItem, I could use some tips how to do this since I'm quite new to the Qt.
Bookmarks