Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 259
Al2O3 Avatar asked Sep 10 '26 20:09

Al2O3


1 Answers

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.

like image 170
Chris Avatar answered Sep 12 '26 16:09

Chris