"quick": rename "Lisp.fun()" to "Lisp.call()"; allow optionally passing JS "this" (a QQuickItem) as first argument;

This commit is contained in:
polos 2017-01-26 20:37:44 +01:00
parent 9e09c38766
commit 2aee9968c6
14 changed files with 117 additions and 44 deletions

View file

@ -7,12 +7,21 @@
(require :qml-lisp "qml-lisp")
(use-package :qml)
;; for example (5) in "qml/example.qml"
(defun show-properties-dialog ()
(unless (find-package :properties)
(load (in-home "gui/properties")))
(funcall (find-symbol "SHOW" :properties) qml:*caller*))
(defun run ()
;; *quick-view* can be either a QQuickView or a QQuickWidget
(setf qml:*quick-view* (qnew "QQuickView(QUrl)"
(|fromLocalFile.QUrl| "qml/example.qml")))
(|setResizeMode| qml:*quick-view* |QQuickView.SizeRootObjectToView|)
(|resize| qml:*quick-view* '(300 200))
(|resize| qml:*quick-view* '(350 350))
(|show| qml:*quick-view*))
(run)