add trivial "qml-lisp" example (call Lisp from QML); tiny revisions;

This commit is contained in:
polos 2017-01-17 00:06:00 +01:00
parent 75c2b80e4e
commit 0e82b0a517
10 changed files with 123 additions and 3 deletions

View file

@ -0,0 +1,22 @@
;;; QQuickView loading Lisp enabled QML
#-qt-wrapper-functions ; see README-OPTIONAL.txt
(load (in-home "src/lisp/all-wrappers"))
(require :qml-lisp "qml-lisp")
(qrequire :quick)
(defun example-url (name)
(|fromLocalFile.QUrl| (in-home (x:cc "examples/M-modules/quick/qml-lisp/qml/" name))))
;;; QQuickView
(defvar *quick-view* (qnew "QQuickView(QUrl)" (example-url "example.qml")))
(defun run ()
(|setResizeMode| *quick-view* |QQuickView.SizeRootObjectToView|)
(|resize| *quick-view* '(200 100))
(|show| *quick-view*))
(run)