PDA

View Full Version : QTree view style sheet issue



meraj ansari
13th May 2010, 12:27
Hi,

I am using QTreeView control using "QFileSystemModel" as a model to feed treeview. I am using style sheets to change visual appearance of tree view. most of the styling is working as expected but the problem is with scroll bar. I want to change the scroll bar's appearance also but i don't know what selector i have to used for applying skinning on it.

Any suggestions what i am missing?

aamer4yu
13th May 2010, 12:50
Customizing QScrollBar (http://doc.qt.nokia.com/4.6/stylesheet-examples.html#customizing-qscrollbar)

meraj ansari
13th May 2010, 13:05
Thanks aamer.

One interesting point is that i have read this document but what i was guessing is that i have to first choose scrollbar with treeview e.g..(QTreeControl#scrollbar) and then apply style on it. I missed this possibility:(.

Anyways, what i assume is that this will tweak all scrollbar's apperence in the application. What if i only want to customize treeview's scroll bar?

Note- As i am new to QT so it may be possible i am missing easy stuffs.

aamer4yu
13th May 2010, 13:50
From the docs -

Child Selector QDialog > QPushButton Matches all instances of QPushButton that are direct children of a QDialog.

Similarly you will neeed something like QTreeView > QScrollBar

meraj ansari
13th May 2010, 14:59
Thanks, I will check it.