mirror of
https://gitlab.com/eql/EQL5.git
synced 2025-12-06 10:31:19 -08:00
"quick": add convenience function RELOAD (after changes to QML file)
This commit is contained in:
parent
e806513a51
commit
e7c371aeea
2 changed files with 18 additions and 6 deletions
|
|
@ -16,6 +16,7 @@
|
|||
#:js
|
||||
#:qml-get
|
||||
#:qml-set
|
||||
#:reload
|
||||
#:root-item))
|
||||
|
||||
(provide :qml-lisp)
|
||||
|
|
@ -30,9 +31,9 @@
|
|||
(let ((upper (string-upcase name))
|
||||
(p (position #\: name)))
|
||||
(if p
|
||||
(intern (subseq upper (1+ (position #\: name :from-end t)))
|
||||
(subseq upper 0 p))
|
||||
(intern upper))))
|
||||
(find-symbol (subseq upper (1+ (position #\: name :from-end t)))
|
||||
(subseq upper 0 p))
|
||||
(find-symbol upper))))
|
||||
|
||||
;;; function calls from QML
|
||||
|
||||
|
|
@ -94,6 +95,11 @@
|
|||
(defun children (item/name)
|
||||
(|childItems| (quick-item item/name)))
|
||||
|
||||
(defun reload ()
|
||||
"Force reloading of QML file after changes made to it."
|
||||
(|clearComponentCache| (|engine| *quick-view*))
|
||||
(|setSource| *quick-view* (|source| *quick-view*)))
|
||||
|
||||
;;; get/set QQmlProperty
|
||||
|
||||
(defun qml-get (item/name property-name)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue