[Qt-interest] Stylesheet weirdness on QTreeWidget
sarvesh saran
aquarian.thunder at gmail.com
Wed Mar 23 09:05:08 CET 2011
Hi,
When using stylesheets, its always a good idea to set the style for some of
the common Pseudo-states of your widget.
You have specified a style for your tree widget item, so you may want to
specify the style for its various states like "selected" etc (
http://doc.qt.nokia.com/latest/stylesheet-reference.html)
This may or may not solve your problem but i think its a good way of using
stylesheets.
thanks,
Sarvesh
On Wed, Mar 23, 2011 at 5:45 AM, Daniele Esposti <expo at expobrain.net> wrote:
> Hi guys,
>
> setting a border to a QTreeWidget item disables the background color
> of the item when is selected.
>
> This is the stylesheet which reproduce the problem:
>
> QTreeWidget {
> background: lightYellow;
> alternate-background-color: white;
> }
> QTreeWidget::item {
> border-bottom: 1px solid lightGray;
> }
>
> If the border-bottom property is removed leaving the item stylesheet
> empty the item's background behaviour is correct.
>
> I've attached an .ui file to show the problem in action using Qt
> Designer's preview
>
> --
> Daniele Esposti
>
> My Blog http://www.expobrain.net
> LinkedIn http://www.linkedin.com/in/danieleesposti
> Twitter http://www.twitter.com/#!/expobrain
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20110323/bfc3d1cd/attachment.html
More information about the Qt-interest-old
mailing list