You could use for example custom roles. Qt::UserRole is the first role that can be used for application-specific purposes:
// define custom roles
const int MinimumRole = Qt::UserRole;
const int MaximumRole = MinimumRole + 1;
// set data for custom roles
item->setData(column, MinimumRole, minimum);
item->setData(column, MaximumRole, maximum);
// get data for custom roles
opt.minimum = index.data(MinimumRole).toInt();
opt.maximum = index.data(MaximumRole).toInt();
// define custom roles
const int MinimumRole = Qt::UserRole;
const int MaximumRole = MinimumRole + 1;
// set data for custom roles
item->setData(column, MinimumRole, minimum);
item->setData(column, MaximumRole, maximum);
// get data for custom roles
opt.minimum = index.data(MinimumRole).toInt();
opt.maximum = index.data(MaximumRole).toInt();
To copy to clipboard, switch view to plain text mode
Bookmarks