Solved QStyledItemDelegate vs QSqlQueryModel::data()
-
Given a
QSqlQueryModel
and aQTableView
.How exactly are items displayed, wrt
QStyledItemDelegate
vsQSqlQueryModel::data()
?Specifically: when an item is just being displayed, i.e.
Qt::DisplayRole
, does the (default?)QStyledItemDelegate
callQSqlQueryModel::data(index, Qt::DisplayRole)
to get the string representation of the data and display that, or does the (default?)QStyledItemDelegate
have its own code to do the display role/string work? -
Hi,
It will call QModelIndex::data that it will then feed to displayText in order to have the text to draw in the cell.