Results 1 to 3 of 3

Thread: Can I use a QWidget as a renderer in an ItemDelegate?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Can I use a QWidget as a renderer in an ItemDelegate?

    Hi all,

    For those familiar with the ListCellRenderer concept in Swing, is there a way to do the equivalent with QT?

    I have to implement a custom delegate for my listview, but the layout is a bit complicated (see the attached file to see an example of what i want to do).

    In swing, as i remember it, i would create this layout in a component, and use this component as a stamp to paint each row.

    I can't figure out how to do the same with QT. I'd like my delegate to have a single instance of a component. Each time paint() is called on my delegate, i would populate this component with data for the current row, then render this component to paint the row.

    Is this possible? Or is there a better way that i'm missing?
    Attached Images Attached Images

Similar Threads

  1. QtScript Binding problem with QWidget
    By zack in forum Qt Programming
    Replies: 3
    Last Post: 17th February 2009, 09:38
  2. Replies: 0
    Last Post: 11th November 2008, 15:36
  3. Dynamic updates of a QWidget in a QScrollArea
    By plamkata in forum Qt Programming
    Replies: 2
    Last Post: 20th July 2008, 23:45
  4. Error in put one QWidget in another QWidget
    By xjtu in forum Qt Programming
    Replies: 1
    Last Post: 19th April 2008, 16:05
  5. Replies: 3
    Last Post: 8th March 2007, 14:54

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