Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
SteveG last edited by
myclass.test(["Value1", "Value2", "Value3"]);
in a QML file and
Q_INVOKABLE void test(QList<QString> arg);
in MyClass.h (with corresponding code in MyClass.cpp)
but it generates an error when I use &arg or *arg.
Must the return type of a C++ method also be a value or can references or pointers be used?
You can use pointers to QObjects. I don't think any other would work, apart from standard const references (const QString &blah).