[PyQt] Problems with stylesheets.

Gustavo A. Díaz gustavo.diaz at gmail.com
Tue Dec 4 12:40:25 GMT 2007


I didn't said request of example Lack of polite... read better ;)
Besides this is most matter of css, not code. So, i will not agree with you.
And not, i am not to lazy of nothing... i always posted indeed the final
solution after (and even if nobody answer my post) so people could have it
as an example (like the Simple Chat example Translated and improved into
PyQt)...
So.. what are you talking about? Follow my posts next time.

Now, returning into the main Thread, this is the stylesheet code example for
a fully styled scrollbar:

self.setStyleSheet ("QScrollBar:vertical { \
                      border-image: url(:/Styles/styles/scrollbar_bg.png) 5
0 5 0; \
                      width: 15px; \
                      margin: 15px 0 15px 0;\
                padding-top:-5px; \
                padding-bottom:-5px; \
                border-top: 5px; \
                border-bottom: 5px;} \
                      QScrollBar::handle:vertical { \
                      border-image: url(:/Styles/styles/scrollbar_body.png)
5 0 5 0 repeat; \
                min-height: 10px; \
                border-top: 5px; \
                border-bottom: 5px;} \
                QScrollBar::handle:vertical:hover { \
                      border-image:
url(:/Styles/styles/scrollbar_body_hover.png) 5 0 5 0 repeat; \
                border-top: 5px; \
                border-bottom: 5px;} \
                QScrollBar::handle:vertical:pressed { \
                      border-image:
url(:/Styles/styles/scrollbar_body_pressed.png) 5 0 5 0 repeat; \
                border-top: 5px; \
                border-bottom: 5px;} \
                QScrollBar::sub-line:vertical { \
                      border: 0px; \
                      background-image: url(); \
                      height: 15px; \
                      subcontrol-position: top; \
                      subcontrol-origin: margin;} \
                QScrollBar::add-line:vertical { \
                      border: 0px; \
                      background-image: url(); \
                      height: 15px; \
                      subcontrol-position: bottom; \
                      subcontrol-origin: margin;} \
                QScrollBar::up-arrow:vertical { \
                      background-image:
url(:/Styles/styles/scrollbar_upArrow.png); \
                background-repeat: no repeat; \
                width: 15px; \
                height: 15px;} \
                QScrollBar::up-arrow:vertical:hover { \
                      background-image:
url(:/Styles/styles/scrollbar_upArrow_hover.png); \
                background-repeat: no repeat; \
                width: 15px; \
                height: 15px;} \
                QScrollBar::up-arrow:vertical:pressed { \
                      background-image:
url(:/Styles/styles/scrollbar_upArrow_pressed.png); \
                background-repeat: no repeat; \
                width: 15px; \
                height: 15px;} \
                QScrollBar::down-arrow:vertical { \
                      background-image:
url(:/Styles/styles/scrollbar_downArrow.png); \
                background-repeat: no repeat; \
                width: 15px; \
                height: 15px;} \
                QScrollBar::down-arrow:vertical:hover { \
                      background-image:
url(:/Styles/styles/scrollbar_downArrow_hover.png); \
                background-repeat: no repeat; \
                width: 15px; \
                height: 15px;} \
                QScrollBar::down-arrow:vertical:pressed { \
                      background-image:
url(:/Styles/styles/scrollbar_downArrow_pressed.png); \
                background-repeat: no repeat; \
                width: 15px; \
                height: 15px;} \
                      QScrollBar::add-page:vertical,
QScrollBar::sub-page:vertical { \
                      background: none;}")

And you have as result:
http://opencoffee.lnxteam.org/downloads/pub/pics/draft/OpenCoffee_scrollbar_v2.png

Cheers.

2007/12/4, Doug Bell <dougb at bellz.org>:
>
> Gustavo A. D?az wrote:
> > I will say for a last time... for a stylesheet is not needed... one
> could
> > create a simple widget to test the stylesheet
>
> Yes, "one" could create a simple widget to test the stylesheet.  Are you
> too lazy to do it yourself and post it?  But you expect busy people who
> might be able to help you to do it???
>
> > I was rude cause the lack of being polite.
>
> But the original request from Pete for a full example wasn't rude.
>
> Good job, though - you've managed to alienate one of the most helpful
> people on the PyQt mailing list.  Good luck next time you need help...
>
> Doug.
>



-- 
Gustavo A. Díaz
GDNet Projects
www.gdnet.com.ar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20071204/38f690c7/attachment.html


More information about the PyQt mailing list