[Qt-interest] QTreeWidget and stylesheets
Richard S. Wright Jr.
rwright at starstonesoftware.com
Thu Apr 2 17:03:03 CEST 2009
Ran into this just the other day myself. When you apply CSS
stylesheets to one of the more complex "composite" controls, you also
have to define sytlesheets for some of the subcontrols. Scrollbars go
boom if you don't. Have a look here for an example QScrollBar style
sheet. When you also define those, they come back to life in your tree
widget (and list views, etc.).
http://doc.trolltech.com/main-snapshot/stylesheet-examples.html
Still trying to figure out QDateTimeEdit myself ;-)
Richard
On Apr 2, 2009, at 10:57 AM, NARCISO, Rui wrote:
>
> Hi all
>
> When changing a QTreeWidget's background color in the ffollowing way:
> self.tree = QTreeWidget()
> self.tree.setStyleSheet("QWidget { background-color: %s }" %
> "steelblue")
> I loose the scroll bars (both horizontal and vertical).
>
> Why ??
> How to solve it ?
>
> Thanks
> Rui
>
>
> The information in this e-mail is confidential. The contents may not
> be disclosed or used by anyone other then the addressee. Access to
> this e-mail by anyone else is unauthorised.
> If you are not the intended recipient, please notify Airbus
> immediately and delete this e-mail.
> Airbus cannot accept any responsibility for the accuracy or
> completeness of this e-mail as it has been sent over public
> networks. If you have any concerns over the content of this message
> or its Accuracy or Integrity, please contact Airbus immediately.
> All outgoing e-mails from Airbus are checked using regularly updated
> virus scanning software but you should take whatever measures you
> deem to be appropriate to ensure that this message and any
> attachments are virus free.
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
More information about the Qt-interest-old
mailing list