[PySide] Strange things with stylesheets

Ronny Deroost millekink at gmail.com
Tue Jun 4 23:21:41 CEST 2013

Dear all,

I encountered a strange behavior and I'm kinda stuck.

I'm currently creating an application and to spice up the gui I use some
Which seem to work, except for the panels of a QToolbox.

When I see the preview In Qt Creator all is ok. But when I use pyside-uic.exe
to convert everything into a .py file, the panels are not styled.

I also tried the same stylesheet with PyQt and there it works.

1. in Ct Creator, where it works
   See WorkingStylesheet

2. when running from python, where it doesn't work
    See NotWorkingStylesheet

Style sheet:

 background: qradialgradient(
   cx: 0.5, cy: -1.8,
   fx: 0.5, fy: 0,
   radius: 2,
   stop: 0 #9aa9be,
   stop: 1 #293859);
  font: bold;}

The code of the stylesheet is in the "compiled" ui file.
I also tried some other stylesheets which when working in the preview,
would not work in the running application.

Did anyone have the same problem or found a work around to this?
I searched but could not find a solution. So I'm hoping the wizards of the
PySide community have a solution.

Ooh yeah
I use Python 2.7.4
Pyside 1.1.2
Qt version 4.8.2

Kind regards,
Ronny Deroost
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20130604/32068a89/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: WorkingStyleSheet.png
Type: image/png
Size: 16879 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20130604/32068a89/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: NotWorkingStyleSheet.png
Type: image/png
Size: 20403 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20130604/32068a89/attachment-0001.png>

More information about the PySide mailing list