Results 1 to 2 of 2

Thread: QTreeView/Widget and decoration of them

  1. #1
    Join Date
    Jun 2012
    Posts
    33
    Thanks
    6

    Default QTreeView/Widget and decoration of them

    Hello!

    Can U give me some advice how to do like in attach file.

    So I need to draw this rectangles with rounded edges?

    As I understand I need to do some CSS and I need to use my implementation of QStyledDelegateItem to do that CSS applying only for first column?

    Am I right?
    Can U give me some examples of how to do this?

    carhun.
    Attached Images Attached Images
    Last edited by carhun; 13th July 2012 at 09:31.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,376
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: QTreeView/Widget and decoration of them

    The picture doesn't explain well what you want but if I guess correctly what your goal is then you should reimplement QTreeView::drawBranches() to provide your own branch drawing code. It's possible you'll have to reimplement drawRow() as well. An alternative is to reimplement drawTree() to draw custom background for items and then just call existing implementation of drawRow() (however the first approach should be simpler for you).
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 1
    Last Post: 6th July 2011, 07:03
  2. QTreeView decoration events
    By xwhatsit in forum Qt Programming
    Replies: 0
    Last Post: 10th September 2010, 09:10
  3. QTreeView show-decoration-selected has no effect
    By stefanadelbert in forum Qt Programming
    Replies: 3
    Last Post: 2nd July 2010, 00:42
  4. Replies: 1
    Last Post: 10th June 2010, 06:35
  5. QTreeView: make root decoration appear on visual column 0
    By chezifresh in forum Qt Programming
    Replies: 1
    Last Post: 22nd November 2008, 03:36

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
  •  
Qt is a trademark of The Qt Company.