Results 1 to 1 of 1

Thread: customize the root node of a treeview

  1. #1
    Join Date
    Aug 2006
    Posts
    24
    Qt products
    Qt4
    Platforms
    Windows

    Unhappy customize the root node of a treeview

    hello guys,

    i want to customize my treeview with style sheet. but i discovered that the root node items cannot be customized. the background is always gray.

    i'm setting the background of my treeview like this:

    QTreeView {
    alternate-background-color: yellow;
    background-color:black;
    }

    QTreeView::item {
    background-color:red;
    }

    but this only affects on the normal tree nodes.

    i'm attaching a picture, those i circled in red are the node items that i want to customize.

    is there anybody having done this before?

    thanks.
    Attached Images Attached Images

Similar Threads

  1. How to delete a node in treeview?
    By jasonjoy in forum Qt Programming
    Replies: 3
    Last Post: 10th November 2009, 07:07
  2. Referencing QCA Using QMake
    By wswartzendruber in forum Qt Programming
    Replies: 1
    Last Post: 29th July 2009, 09:09
  3. Qt 4.2.2 and SuSE Linux 9.3
    By Teuniz in forum Installation and Deployment
    Replies: 15
    Last Post: 26th February 2007, 13:21
  4. 4.1.4 built from source, qmake fails with Hello World
    By Mookie in forum Installation and Deployment
    Replies: 6
    Last Post: 28th June 2006, 00:13

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.