diff options
Diffstat (limited to 'tests/auto/qml/qmlcppcodegen/data/listprovider.h')
-rw-r--r-- | tests/auto/qml/qmlcppcodegen/data/listprovider.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/auto/qml/qmlcppcodegen/data/listprovider.h b/tests/auto/qml/qmlcppcodegen/data/listprovider.h new file mode 100644 index 0000000000..076944b586 --- /dev/null +++ b/tests/auto/qml/qmlcppcodegen/data/listprovider.h @@ -0,0 +1,24 @@ +#ifndef QLISTPROVIDER_H +#define QLISTPROVIDER_H + +#include <QObject> +#include <QQmlEngine> + +class QListProvider : public QObject +{ + Q_OBJECT + QML_NAMED_ELEMENT(ListProvider) + +public: + explicit QListProvider(QObject *parent = nullptr) : QObject(parent) { } + + Q_INVOKABLE QList<int> intList() const + { + QList<int> list; + for (int i = 0; i < 3; ++i) + list.append(i); + return list; + } +}; + +#endif // QLISTPROVIDER_H |