[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] How do I find the system colour-theme?
From: Jonathan Noble <jonnobleuk () gmail ! com>
Date: 2010-08-27 17:29:55
Message-ID: AANLkTinS0AuJGa8_AQ3MyuchRVAqCDYvXV-+SWqwZkQ- () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
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@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@riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
[Attachment #5 (text/html)]
Thanks Baz. I saw the Qpallete class earlier and wasn't sure what to make of \
it.<br><br><div class="gmail_quote">On 27 August 2010 17:34, Baz Walter <span \
dir="ltr"><<a href="mailto:bazwal@ftml.net">bazwal@ftml.net</a>></span> \
wrote:<br> <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex;"><div><div></div><div class="h5">On 27/08/10 11:07, \
Jonathan Noble wrote:<br> <blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex"> Hi, I am using a QTableWidget that \
needs to have one row's background colour<br> changed. However, I do not know how \
to reset the change based on the systems<br> colour theme.<br>
<br>
This image shows what happens if I do not do hackish reset:<br>
<a href="http://www.flickr.com/photos/jonnobleuk/4931228167/" \
target="_blank">http://www.flickr.com/photos/jonnobleuk/4931228167/</a><br> <br>
This image shows what happens if I use the hackish fix if In a foreign<br>
colour theme:<br>
<a href="http://gereqi.googlecode.com/issues/attachment?aid=4972320403488235356&na \
me=gereqi-theme-issue.png&token=25ed6a0bb6f47c881d5e410f32a2d5fb&inline=1" \
target="_blank">http://gereqi.googlecode.com/issues/attachment?aid=4972320403488235356 \
&name=gereqi-theme-issue.png&token=25ed6a0bb6f47c881d5e410f32a2d5fb&inline=1</a><br>
<br>
How do I find the colour-theme?<br>
</blockquote>
<br></div></div>
palette = mytablewidget.palette()<br>
<br>
# row colours<br>
palette.base().color()<br>
palette.alternateBase().color()<br>
<br>
# selection colours<br>
palette.highlight().color()<br>
palette.highlightedText().color()<br>
<br>
see:<br>
<br>
<a href="http://doc.qt.nokia.com/4.6/qwidget.html#palette-prop" \
target="_blank">http://doc.qt.nokia.com/4.6/qwidget.html#palette-prop</a><br> <a \
href="http://doc.qt.nokia.com/4.6/qpalette.html#ColorGroup-enum" \
target="_blank">http://doc.qt.nokia.com/4.6/qpalette.html#ColorGroup-enum</a><div><div></div><div \
class="h5"><br> _______________________________________________<br>
PyQt mailing list <a href="mailto:PyQt@riverbankcomputing.com" \
target="_blank">PyQt@riverbankcomputing.com</a><br> <a \
href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt" \
target="_blank">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a><br> \
</div></div></blockquote></div><br>
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic