[PyQt] How do I find the system colour-theme?

Jonathan Noble jonnobleuk at gmail.com
Fri Aug 27 18:29:55 BST 2010


Thanks Baz. I saw the Qpallete class earlier and wasn't sure what to make of
it.

On 27 August 2010 17:34, Baz Walter <bazwal at ftml.net> wrote:

> On 27/08/10 11:07, Jonathan Noble wrote:
>
>> Hi, I am using a QTableWidget that needs to have one row's background
>> colour
>> changed. However, I do not know how to reset the change based on the
>> systems
>> colour theme.
>>
>> This image shows what happens if I do not do hackish reset:
>> http://www.flickr.com/photos/jonnobleuk/4931228167/
>>
>> This image shows what happens if I use the hackish fix if In a foreign
>> colour theme:
>>
>> http://gereqi.googlecode.com/issues/attachment?aid=4972320403488235356&name=gereqi-theme-issue.png&token=25ed6a0bb6f47c881d5e410f32a2d5fb&inline=1
>>
>> How do I find the colour-theme?
>>
>
> palette = mytablewidget.palette()
>
> # row colours
> palette.base().color()
> palette.alternateBase().color()
>
> # selection colours
> palette.highlight().color()
> palette.highlightedText().color()
>
> see:
>
> http://doc.qt.nokia.com/4.6/qwidget.html#palette-prop
> http://doc.qt.nokia.com/4.6/qpalette.html#ColorGroup-enum
>
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20100827/49d0e9f1/attachment.html>


More information about the PyQt mailing list