PDA

View Full Version : QTableWidgetItem



weixj2003ld
5th August 2011, 11:11
Hi,every one.
I want to draw some pictures with QPainterPath and put them on QTableWidgetItem,I do not know how to realize it?
Thk u.

revellix
5th August 2011, 12:30
Hmmm ... draw in a widget... and set the widget to the QTableWidget with

void setCellWidget ( int row, int column, QWidget * widget )

Lykurg
5th August 2011, 12:45
Or more sophisticated: Subclass QWidgetItem and reimp its paint method.

weixj2003ld
7th August 2011, 07:59
Thk u for your answer.
When I drag the UI with mouse and resize it, I find that the intervals of columns and the rows of QTableWidget do not change,
I want to let them change also,how to realize it?