Results 1 to 2 of 2

Thread: QTreeView item color

  1. #1
    Join Date
    Nov 2010
    Posts
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default QTreeView item color

    Is there a way to change the text color of a particular item in a QTreeView? Thx.

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: QTreeView item color

    With a delegate.

    You can create a custom user role "text color" for example, and then let the delegate set the font color.

    Edit: did you try rich text? Maybe it's a simple as using richt text.

Similar Threads

  1. Set text color for menu item
    By stella1016 in forum Qt Programming
    Replies: 6
    Last Post: 16th March 2010, 10:27
  2. bg color of current item for a QTreeView
    By joeld42 in forum Qt Programming
    Replies: 1
    Last Post: 18th October 2009, 17:06
  3. About the background color of QTreeView itmes
    By yandy in forum Qt Programming
    Replies: 3
    Last Post: 26th March 2009, 15:38
  4. Changing font color for a single item in a QTreeView
    By Doug Broadwell in forum Qt Programming
    Replies: 1
    Last Post: 3rd November 2007, 19:14
  5. Changing the text color of a QTreeView leaf.
    By johnny_sparx in forum Qt Programming
    Replies: 3
    Last Post: 22nd March 2006, 23:58

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.