mirror of
https://gitlab.com/eql/EQL5.git
synced 2025-12-06 10:31:19 -08:00
add 'qml-call' to all 'quick' examples (for calling QML methods)
This commit is contained in:
parent
a5d8640ca6
commit
955734e192
7 changed files with 56 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
|||
;;;
|
||||
;;; * enables QML to call Lisp functions
|
||||
;;; * allows to get/set any QML property from Lisp (needs 'objectName' to be set)
|
||||
;;; * allows to call QML methods from Lisp (needs 'objectName' to be set)
|
||||
;;; * allows to evaluate JS code from Lisp (needs 'objectName' to be set)
|
||||
;;;
|
||||
|
||||
|
|
@ -13,6 +14,7 @@
|
|||
#:children
|
||||
#:find-quick-item
|
||||
#:js
|
||||
#:qml-call
|
||||
#:qml-get
|
||||
#:qml-set
|
||||
#:qml-set-all
|
||||
|
|
@ -113,6 +115,12 @@
|
|||
(|clearComponentCache| (|engine| *quick-view*))
|
||||
(|setSource| *quick-view* (|source| *quick-view*)))
|
||||
|
||||
;;; call QML methods
|
||||
|
||||
(defun qml-call (item/name method-name &rest arguments)
|
||||
;; QFUN+ comes in handy here
|
||||
(apply 'qfun+ (quick-item item/name) method-name arguments))
|
||||
|
||||
;;; get/set QQmlProperty
|
||||
|
||||
(defun qml-get (item/name property-name)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue