PDA

View Full Version : QTableWidget - images in columns



bruccutler
1st May 2007, 15:41
Hello,
I want to display images in columns of my QTableWidget instead of text.

How do I do this? Using setIcon() only sets the icon and is not large enough.

Does QTableWidget support images as cell data or should I use another type of widget?
- BRC

marcel
1st May 2007, 16:05
Try using setCellWidget, and pass a simple, custom widget, that has the size hint of the pixmap being painted on it.

Regards

VireX
1st May 2007, 18:10
You may want to override, the QHeaderView etc. Also AbstractItemView too.

bruccutler
1st May 2007, 19:28
Thanks. I didn't know about that api. I will just set the text on a label and then display that in the table.
- BRC