[PyQt] QStyle.styleHint() returning negative value for rgb

Phil Thompson phil at riverbankcomputing.com
Tue Mar 23 11:53:02 GMT 2010


On Tue, 23 Mar 2010 11:39:41 +0000, Jugdish <jugdizh at gmail.com> wrote:
> I'm trying to get the color value for the table grid by making the
> following
> call:
> 
> QtGui.QApplication.style().styleHint(QtGui.QStyle.SH_Table_GridLineColor,
> option, self)
> 
> but this returns -3684409, which is not a valid qRgb (throws an error
when
> constructing a QColor from it). Looking at the internals of styleHint,
the
> number that it's returning is actually
> option.palette.color(QPalette.Mid).rgb(). If I call that method directly,
I
> get 4291282887. So at what point is this value becoming negative?

See...

http://www.riverbankcomputing.com/pipermail/pyqt/2010-February/025893.html

Phil


More information about the PyQt mailing list