3

Does anyone know the relation between return value of

QTableWidget::item(x, y) 

and

 QTableWidget::cellWidget (x, y)

in the same QTableWidget and same row.column.?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Al2O3
  • 3,103
  • 4
  • 26
  • 52

1 Answers1

5

It's all in the return value.

item() returns the QTableWidgetItem* associated with that row/column.

cellWidget() is more closely associated with setItemWidget(QWidget*), and returns the QWidget* that was given in the setItemWidget call.

Chris
  • 17,119
  • 5
  • 57
  • 60