Al2O3
Al2O3

Reputation: 3203

QTableWidget::item() QTableWidget::cellWidget ()?

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.?

Upvotes: 3

Views: 2296

Answers (1)

Chris
Chris

Reputation: 17535

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.

Upvotes: 5

Related Questions