mirror of
https://gitlab.com/eql/EQL5.git
synced 2025-12-08 11:31:07 -08:00
add trivial "qml-lisp" example (call Lisp from QML); tiny revisions;
This commit is contained in:
parent
75c2b80e4e
commit
0e82b0a517
10 changed files with 123 additions and 3 deletions
22
examples/M-modules/quick/qml-lisp/example.lisp
Normal file
22
examples/M-modules/quick/qml-lisp/example.lisp
Normal 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)
|
||||
Loading…
Add table
Add a link
Reference in a new issue