[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] stylesheet sub-controlls
From: Lennart Jansen <lord.len () gmx ! net>
Date: 2010-03-25 0:58:07
Message-ID: 4BAAB51F.6020808 () gmx ! net
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
Hi,
thank for the response... i found the answer by myself by now XD
self.baraction.setStyleSheet("""QProgressBar
{background-color: white;
text-align: center;
color: black;
border: 2px
solid black;
border-radius: 6px;}
----->
QProgressBar::chunk{background-color: green;
----->
border-radius: 3px;}
""")
my problem was that i didnt get it that the string itself is kinda like
in c++, i wrote the syntax like python code and since this didnt work i
started thinking it wouldnt work at all....
Am 25.03.2010 00:45, schrieb Nick Gaens:
> Hello Lennart,
>
> By subcontrols, do you mean something like:
>
> qpushbutton { color: white; }
>
> qpushbutton:pressed { color: black; }
>
> ?
>
> If so, you can set the same stylesheet to a widget as in the "regular"
> Qt, it has little to do with PyQt itself, since the stylesheet is just
> a string to be parsed.
>
>
> On Wed, Mar 24, 2010 at 9:22 AM, Lennart Jansen <lord.len@gmx.net
> <mailto:lord.len@gmx.net>> wrote:
>
> Hi,
>
> are there "stylesheet sub-controlls" in pyqt like in qt? For
> example the widget Qprogressbar in qt got the sub-controll chunk,
> but i cant find anything like it in pyqt.
>
> I wish all of you a good day!
> --
> Sicherer, schneller und einfacher. Die aktuellen Internet-Browser -
> jetzt kostenlos herunterladen! http://portal.gmx.net/de/go/chbrowser
> _______________________________________________
> PyQt mailing list PyQt@riverbankcomputing.com
> <mailto:PyQt@riverbankcomputing.com>
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
>
>
>
> --
> Nick Gaens
>
>
> _______________________________________________
> PyQt mailing list PyQt@riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[Attachment #5 (text/html)]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-15">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
<br>
thank for the response... i found the answer by myself by now XD<br>
<br>
<br>
<br>
self.baraction.setStyleSheet("""QProgressBar
{background-color: white;<br>
text-align: center;<br>
color: black;<br>
border: 2px
solid black;<br>
border-radius: 6px;}<br>
<br>
----->
QProgressBar::chunk{background-color: green;<br>
----->
border-radius: 3px;}<br>
""")<br>
<br>
my problem was that i didnt get it that the string itself is kinda like
in c++, i wrote the syntax like python code and since this didnt work i
started thinking it wouldnt work at all....<br>
<br>
<br>
<br>
Am 25.03.2010 00:45, schrieb Nick Gaens:
<blockquote
cite="mid:38ff15fe1003241645p5797f9b9y925c684cad7863af@mail.gmail.com"
type="cite">Hello Lennart,
<div><br>
</div>
<div>By subcontrols, do you mean something like:</div>
<div><br>
</div>
<div>qpushbutton { color: white; }</div>
<div><br>
</div>
<div>qpushbutton:pressed { color: black; }</div>
<div><br>
</div>
<div>?</div>
<div><br>
</div>
<div>If so, you can set the same stylesheet to a widget as in the
"regular" Qt, it has little to do with PyQt itself, since the
stylesheet is just a string to be parsed.</div>
<div><br>
</div>
<div><br>
<div class="gmail_quote">On Wed, Mar 24, 2010 at 9:22 AM, Lennart
Jansen <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:lord.len@gmx.net">lord.len@gmx.net</a>></span> wrote:<br>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; \
padding-left: 1ex;">Hi,<br> <br>
are there "stylesheet sub-controlls" in pyqt like in qt? For
example the widget Qprogressbar in qt got the sub-controll chunk, but i
cant find anything like it in pyqt.<br>
<br>
I wish all of you a good day!<br>
<font color="#888888">--<br>
Sicherer, schneller und einfacher. Die aktuellen Internet-Browser -<br>
jetzt kostenlos herunterladen! <a moz-do-not-send="true"
href="http://portal.gmx.net/de/go/chbrowser" \
target="_blank">http://portal.gmx.net/de/go/chbrowser</a><br> \
_______________________________________________<br> PyQt mailing list <a \
moz-do-not-send="true" \
href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a><br> <a \
moz-do-not-send="true" \
href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt" \
target="_blank">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a><br> \
</font></blockquote> </div>
<br>
<br clear="all">
<br>
-- <br>
Nick Gaens<br>
</div>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
PyQt mailing list <a class="moz-txt-link-abbreviated" \
href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a> <a \
class="moz-txt-link-freetext" \
href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a></pre>
</blockquote>
<br>
</body>
</html>
_______________________________________________
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