Results 1 to 5 of 5

Thread: QTree view style sheet issue

  1. #1
    Join Date
    May 2010
    Posts
    18
    Thanks
    4
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default QTree view style sheet issue

    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?

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QTree view style sheet issue


  3. #3
    Join Date
    May 2010
    Posts
    18
    Thanks
    4
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QTree view style sheet issue

    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.

  4. #4
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QTree view style sheet issue

    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

  5. The following user says thank you to aamer4yu for this useful post:

    meraj ansari (13th May 2010)

  6. #5
    Join Date
    May 2010
    Posts
    18
    Thanks
    4
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: QTree view style sheet issue

    Thanks, I will check it.

Similar Threads

  1. QT push button style sheet issue
    By meraj ansari in forum Qt Programming
    Replies: 4
    Last Post: 4th October 2013, 13:56
  2. Problems with Gradient style used through Style sheet on ARM platform
    By puneet.narsapur in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 25th January 2010, 13:48
  3. style sheet issue.
    By kaushal_gaurav in forum Qt Programming
    Replies: 2
    Last Post: 7th August 2008, 08:18
  4. QToolButton and Style sheet
    By desch in forum Qt Programming
    Replies: 8
    Last Post: 1st December 2007, 09:38
  5. How to use style sheet
    By safknw in forum Qt Programming
    Replies: 1
    Last Post: 20th November 2006, 14:05

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.