[PyQt] Problems with stylesheets.

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


Was cause for example i was styling the scroll bar which was inside a
textEdit using self.stylesheet(QScrollbar bla bla bla) so to style all the
scrollbars of the app, but, i already had self.stylesheet(QPushButton bla
bla) in my app, so when i was styling the scrollbar, i was disabling the
QPushButton style.
How i fixed? Styling the scrollbar and the textEdit in the same place, so
self.chatTextEdit(stylesheet of the scrollbar and the textedit inside)

Have a look here:
http://opencoffee.lnxteam.org/trac/browser/trunk/opencoffee-client/MainApp.py#L127
If you look at the end of the stylesheet is included the QTextEdit
stylesheet as well too.

Mainly the problem was to use self.stylesheet () twice in the same app.
Is better when you refer to the widget you are styling,
self.widget.setStylesheet()

2007/12/4, David Boddie <dboddie at trolltech.com >:
>
> On Tue Dec 4 12:40:25 GMT 2007, Gustavo A. Díaz wrote:
>
> > Now, returning into the main Thread, this is the stylesheet code example
> for
> > a fully styled scrollbar:
>
> [...]
>
> > And you have as result:
> >http://opencoffee.lnxteam.org/downloads/pub/pics/draft/OpenCoffee_scrollbar_v2.png
>
>
> Is it working now? If so, what was the cause of the problem with the
> buttons?
>
> David
> --
> David Boddie
> Lead Technical Writer, Trolltech ASA
>
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>



-- 
Gustavo A. Díaz
GDNet Projects
www.gdnet.com.ar


-- 
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/82e61ea9/attachment-0001.html


More information about the PyQt mailing list