[Solved] Displaying an image in a QTableView
-
wrote on 11 Aug 2011, 02:33 last edited by
I have a QTableView where one column needs to contain both the image and text. What I have is a model that returns the QPixmap on the Qt::DecorationRole and the text on Qt::DisplayRole. The problem is the height of each row cuts off the image. How exactly do I get the height to adjust to that of the image?
I tried returning the QSize of the QPixmap on the Qt::SizeHintRole, but then there is no image at all.
What am I missing?
SAm
-
wrote on 15 Aug 2011, 16:55 last edited by
What model are you using for your view?
-
wrote on 15 Aug 2011, 16:58 last edited by
Volker,
I figured it out on my own. Assuming I had a bad subject I posted the Q in another thread, where I explained my solution. I thought I had posted it here, too, but I guess not.
Here is the link:http://developer.qt.nokia.com/forums/viewthread/8738
-
wrote on 15 Aug 2011, 17:02 last edited by
No problem, I just read through a huge backlog of postings :-)
I'm setting this to solved.
1/4