Results 1 to 20 of 70

Thread: How to show progess in a QTreeView item ?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #37
    Join Date
    Mar 2007
    Location
    Ukraine, Odessa
    Posts
    140
    Qt products
    Qt4
    Platforms
    MacOS X Windows
    Thanks
    15
    Thanked 11 Times in 10 Posts

    Default Re: How to show progess in a QTreeView item ?

    Quote Originally Posted by jpn View Post
    The QStyleOptionViewItem parameter contains all required information.
    Qt Code:
    1. if (opt.state & QStyle::State_Selected)
    2. ...
    3.  
    4. if (opt.state & QStyle::State_HasFocus)
    5. ...
    To copy to clipboard, switch view to plain text mode 
    etc.
    And what after ???
    I've tried like
    Qt Code:
    1. if (opt.state & QStyle::State_Selected)
    2. {
    3. painter->setBrush(QBrush(QColor("#444444")));
    4. painter->drawRect(opt.rect);
    5. }
    To copy to clipboard, switch view to plain text mode 
    Result -
    Attached Images Attached Images
    • File Type: jpg 1.jpg (6.3 KB, 36 views)
    C++ & AMD forever

Similar Threads

  1. Replies: 4
    Last Post: 26th September 2011, 13:02
  2. QTreeView and item editing
    By roxton in forum Qt Programming
    Replies: 3
    Last Post: 25th July 2008, 19:56
  3. QTreeView, QSortFilterProxyModel and item expansions
    By benacler in forum Qt Programming
    Replies: 3
    Last Post: 21st May 2008, 21:30
  4. QTreeView: selection behavior upon selected item removal
    By Pieter from Belgium in forum Qt Programming
    Replies: 6
    Last Post: 11th July 2007, 17:00
  5. paint QTreeView item !!
    By mcenatie in forum Qt Programming
    Replies: 2
    Last Post: 19th March 2006, 15:24

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.