Results 1 to 4 of 4

Thread: [Qt 4.x] Highliting rows in a QTreeView

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Posts
    33
    Thanks
    3
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11

    Default [Qt 4.x] Highliting rows in a QTreeView

    Hi,

    I want to highlight every other row in a QTreeView by changing the background colour for every ohter row.
    |one |
    |two|
    |three|
    |four|

    I have done this in qt3 by reimplementing

    Qt Code:
    1. QListViewItem::paintCell( QPainter *p, const QColorGroup &cg,
    2. int column, int width, int alignment )
    To copy to clipboard, switch view to plain text mode 
    I have a custom model which I feed into the view.

    I just don't find an appropriate pointer where to do it.
    In repaint of the view?
    Or do I have to use a custom style?

    Thanks,

    Moppel
    Last edited by Moppel; 9th March 2006 at 22:06.

Similar Threads

  1. Replies: 4
    Last Post: 26th September 2011, 12:02
  2. QTreeView and multi-select of rows
    By QPlace in forum Qt Programming
    Replies: 1
    Last Post: 27th October 2008, 02:32
  3. Fetching rows in QtreeView
    By visor_ua in forum Qt Programming
    Replies: 2
    Last Post: 5th July 2008, 18:17
  4. QTreeView rows (items) StyleSheet
    By Kostanev in forum Qt Programming
    Replies: 1
    Last Post: 15th September 2007, 10:36
  5. QTreeView rows editable
    By Pesho in forum Qt Programming
    Replies: 5
    Last Post: 13th September 2007, 13:19

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.