QStringRef to QVariant (for use with QStandardItemModel/QModelIndex)
General and Desktop
2
Posts
2
Posters
1.3k
Views
1
Watching
-
I changed from using QString to using QStringRef, since I keep the original string, however QStringRef doesn't "cast" to QVariant, which is needed to use with QStandardItemModel/QModelIndex, forcing me to use QStringRef::toString() and making the entire optimization pointless.
I am not that familiar with QVariant, so my question is who can I proceed in order to avoid the unnecessary duplication of memory?