Hi guys.<br><br>I have a weird problem when i want to style my app, but specially with QPushButton and QScrollBar.<br><br>I have this for QPushButton:<br><br><div style="margin-left: 40px;">self.setStyleSheet (" \<br>
QPushButton {background-image: url(:/Styles/styles/oc_buttonBg.png); color: white; font: bold; \<br> border-style: inset; background-repeat: no repeat; background-position: center;} \<br> QPushButton:hover {background-image: url(:/Styles/styles/oc_buttonBg_hover.png); \
<br> border-style: inset; background-repeat: no repeat; background-position: center;} \<br> QPushButton:pressed {background-image: url(:/Styles/styles/oc_buttonBg_pressed.png);\<br> border-style: inset; background-repeat: no repeat; background-position: center;}")
<br></div><br>And for QScrollBar:<br><br><div style="margin-left: 40px;">self.setStyleSheet ("QScrollBar:vertical { \<br> background-image: url(:/Styles/styles/scrollbar_bg.png); \<br> width: 15px; \
<br> margin: 15px 0 15px 0;} \<br> QScrollBar::handle:vertical { \<br> background-image: url(:/Styles/styles/scrollbar_body.png); \<br> min-height: 15px;} \
<br> QScrollBar::add-line:vertical { \<br> border: 0px; \<br> background-image: url(:/Styles/styles/scrollbar_downArrow_Bg.png); \<br> height: 15px; \
<br> subcontrol-position: bottom; \<br> subcontrol-origin: margin;} \<br> QScrollBar::sub-line:vertical { \<br> border: 0px; \<br> background-image: url(:/Styles/styles/scrollbar_upArrow_Bg.png); \
<br> height: 15px; \<br> subcontrol-position: top; \<br> subcontrol-origin: margin;} \<br> QScrollBar::up-arrow:vertical { \<br> background-image: url(:/Styles/styles/scrollbar_upArrow.png); \
<br> background-repeat: no repeat; \<br> width: 15px; \<br> height: 15px;} \<br> QScrollBar::down-arrow:vertical { \<br> background-image: url(:/Styles/styles/scrollbar_downArrow.png); \
<br> background-repeat: no repeat; \<br> width: 15px; \<br> height: 15px;} \<br> QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical { \<br> background: none;}")
<br><br></div>Now, the buttons are not being styled if the scrollbar stylesheet exist... if i delete the scrollbar stylesheet.. buttons style are there.<br><br>Now, if a use both but in the QPushButton i use directly the name of the Widget to style (lets say,
self.firstButton.setStyleSheet....) the buttons shows the style but the scrollbar back to QT4 default look...<br><br>What is going on?<br><br>Thanks<br><br>Cheers.... and hope someone to respond my post someday.... lately no one does it.... :(
<br><br><br>-- <br>Gustavo A. Díaz<br>GDNet Projects<br><a href="http://www.gdnet.com.ar">www.gdnet.com.ar</a>