I store objects of a custom data type in QStandardListItems. I recover these objects by calling:
i.data(Qt::UserRole + 1).value<LiteReach>();
This only creates a new object in the stack. Any changes I do to them would be temporary.
Is there a way to get the base object stored in itemData so that it could be manipulated directly? If not what would be the preferred method to change itemData?
I would like not to call setData each time an object is modified since it would consume a lot of resources.