blob: 61d38228b091d0e119ea3dd46a6a61f44b96763e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#pragma once
#include <QObject>
#include <QVariantMap>
#include <QtQml/qqmlregistration.h>
class VariantMapLookupFoo : public QObject
{
Q_OBJECT
QML_ELEMENT
Q_PROPERTY(QVariantMap data READ data CONSTANT)
public:
VariantMapLookupFoo(QObject *parent = nullptr) : QObject(parent) { }
private:
QVariantMap data() const { return { { "value", 42 } }; }
};
|