[Qt-interest] Styling QTreeView

richard oehlinger [celum] richard.oehlinger at celum.com
Mon Nov 2 17:20:47 CET 2009


Hi!
Of course I've tried that (as you can see in my attached Stylesheet). And there is some misbehavior if I hover over the tree controls (like the "+" a.k.a. the branch open button.) It remains visible if a hover over another item but is correct if I move the cursor out of the QTreeView.

Best, richard



-----Original Message-----
From: Shi Yan [mailto:billconan at gmail.com] 
Sent: Montag, 02. November 2009 16:53
To: richard oehlinger [celum]
Subject: Re: [Qt-interest] Styling QTreeView

have you tried style sheet?
http://doc.trolltech.com/4.5/stylesheet-examples.html#customizing-qtreeview

On Mon, Nov 2, 2009 at 7:43 AM, richard oehlinger [celum]
<richard.oehlinger at celum.com> wrote:
> Hello!
>
> Has anyone ever tried to set a background image for an item in QTreeView
> with only one column (header is hidden). I thought it would alter the full
> row (including + and the lines of the tree) but it only changes the
> background for the text. But a huge problem is, that if I hover over e.g.
> the "+" the background there also changes but won't be reset to nothing
> after the mouse leaves that area. Is there a pseudo class for the whole row?
> I would need something like QTreeView::row:hover to change the whole row
> (would also be very interesting to have for QTableView)
>
>
>
> I'm using QPlastiqueStyle.
>
>
>
> My stylesheet:
>
>
>
> QTreeView::item:hover {
>
>                 background-image: /*some image*/;
>
> }
>
>
>
> Has anyone a idea?
>
>
>
> Thanks in advance!
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>



-- 
Dept. of Computer Science
University of California, Davis
Homepage:http://wwwcsif.cs.ucdavis.edu/~yans/




More information about the Qt-interest-old mailing list