Results 1 to 2 of 2

Thread: Programmatically Customizing Style of Tree Widget

  1. #1
    Join Date
    Jan 2010
    Posts
    5
    Thanks
    1

    Default Programmatically Customizing Style of Tree Widget

    Greetings,

    Although I have a qss style sheet for the application, I would like to programmatically customize the look of certain widgets. Specifically, I would like to set the images used for each state in a tree widget (State_Children, State_Item, State_Open, State_Sibling).

    If anyone has some sample code for programmatically customizing the style of a tree widget, it would save hours of hair pulling :-)

    Many thanks for any advice,

    JB

  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: Programmatically Customizing Style of Tree Widget

    Read about delegates.
    QStyledItemDelegateand QItemDelegate.

Similar Threads

  1. Tree Widget
    By bismitapadhy in forum Qt Programming
    Replies: 1
    Last Post: 9th June 2009, 08:31
  2. Qt Tree Widget Question
    By alavtec in forum Qt Programming
    Replies: 2
    Last Post: 16th July 2008, 17:21
  3. Tree widget sorting
    By ganeshshenoy in forum Qt Programming
    Replies: 3
    Last Post: 11th February 2008, 14:06
  4. Drag from tree widget
    By EricF in forum Qt Programming
    Replies: 9
    Last Post: 18th December 2007, 00:09
  5. customizing table widget
    By krishna.bv in forum Qt Programming
    Replies: 1
    Last Post: 25th January 2007, 14:43

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.