There's no point in managing enum values or QStrings via pointer. Just use QStringList
(which is a QList<QString>
) or QList<SomeEnum>
. QQmlListProperty is for managing QObjects, as the documentation says:
Note: QQmlListProperty can only be used for lists of QObject-derived object pointers.
Neither QStrings nor enums are. What the best solution is to expose the list to QML depends on your use case.