96 QModelRoleData(Qt::DisplayRole),
97 QModelRoleData(Qt::DecorationRole),
98 QModelRoleData(Qt::CheckStateRole)
106model->multiData(index, span);
112void MyModel::multiData(
const QModelIndex &index, QModelRoleDataSpan roleDataSpan)
const
114 for (QModelRoleData &roleData : roleDataSpan) {
115 int role = roleData.role();
119 roleData.setData(result);
125QVariant MyModel::data(
const QModelIndex &index,
int role)
const
127 QModelRoleData roleData(role);
128 multiData(index, roleData);
129 return roleData.data();
beginInsertRows(parent, 2, 4)
[0]
QModelRoleDataSpan span(roleData)
std::array< QModelRoleData, 3 > roleData
[13]
beginMoveRows(sourceParent, 2, 4, destinationParent, 2)
[5]
beginInsertColumns(parent, 4, 6)
[2]
beginRemoveColumns(parent, 4, 6)
[4]
beginRemoveRows(parent, 2, 3)
[1]