boblebel
2nd May 2009, 19:18
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?
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?