fix and improve "qml-lisp" example; allow nested QVariantLists (JS arrays in QML);

This commit is contained in:
polos 2017-01-17 10:13:45 +01:00
parent 0e82b0a517
commit 03c7a5ded5
5 changed files with 27 additions and 10 deletions

View file

@ -26,13 +26,13 @@ public:
static Lisp* lisp = 0;
static QObject *lisp_provider(QQmlEngine*, QJSEngine*) { return lisp; }
static QObject* lisp_provider(QQmlEngine*, QJSEngine*) { return lisp; }
extern "C" {
LIB_EXPORT QObject* ini() {
if(!lisp) {
qmlRegisterSingletonType<Lisp>("EQL5", 1, 0, "Lisp", lisp_provider);
lisp = new Lisp; }
lisp = new Lisp;
qmlRegisterSingletonType<Lisp>("EQL5", 1, 0, "Lisp", lisp_provider); }
return lisp; }
}