Results 1 to 19 of 19

Thread: QTreeView and StylingSheets for QTreeView

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2016
    Location
    Venice, California
    Posts
    87
    Thanks
    7
    Qt products
    Qt4
    Platforms
    Windows

    Default QTreeView and StylingSheets for QTreeView

    Hi Folks,

    Im having trouble understanding stylesheets and how to set styling of components of a QTreeView.
    I did look at the docs here:
    http://doc.qt.io/qt-5/stylesheet-reference.html &
    http://doc.qt.io/qt-4.8/stylesheet-examples.html

    The component I'd like to style are the Header(Title, Color, Height, Border), The ArrowIcon (Closed and Open Color), and the Scrollbar (Color, Width).
    Also would like to learn how to style things in general. Is there a system of thinking when styling widgets? How would I go about knowing what tags to call. example, i dont know what the arrow thing is called to style it, or the scrollbar.
    I used this for the ScrollArea, but/and i tried to use it with the scroll for the QTreeView, but nothing happened:
    Qt Code:
    1. QscrollBar::vertical{width: 12px;}
    2. QscrollBar::handle:vertical{background: #505050}
    To copy to clipboard, switch view to plain text mode 
    I tried:
    Qt Code:
    1. QTreeView::vertical{width: 12px;}
    2. QTreeView::handle:vertical{background: #505050}
    To copy to clipboard, switch view to plain text mode 

    I guess what I'm asking for is the syntax...maybe.
    Another thing I would like to do is understand the MODEL system. Im using QFileSystemModel as the model set to my TreeView. I was able to set some filters to get the data I want, but how do I not show the last folders in a directory tree?


    Cheers!
    Attached Images Attached Images

Similar Threads

  1. Help ...QTreeView
    By Raymond in forum Qt Programming
    Replies: 2
    Last Post: 16th September 2009, 10:18
  2. QTreeView
    By bunjee in forum Qt Programming
    Replies: 1
    Last Post: 4th March 2009, 20:51
  3. QTreeView. Qt.4.4.1
    By janEUcitzen in forum Qt Programming
    Replies: 1
    Last Post: 15th November 2008, 09:53
  4. QTreeView help
    By bepaald in forum Qt Programming
    Replies: 1
    Last Post: 15th August 2007, 22:22
  5. QTreeView
    By merry in forum Qt Programming
    Replies: 5
    Last Post: 29th May 2007, 09:38

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.