EQL5/examples/M-modules/quick/qml-lisp/example.lisp

19 lines
428 B
Common Lisp

(si::trap-fpe t nil)
;;; QQuickView loading Lisp enabled QML
(qrequire :quick)
(require :properties "properties")
(use-package :qml)
(defun run ()
;; *quick-view* can be either a QQuickView or a QQuickWidget
(setf qml:*quick-view* (qnew "QQuickView"))
(x:do-with qml:*quick-view*
(|setSource| (|fromLocalFile.QUrl| "qml/example.qml"))
(|setResizeMode| |QQuickView.SizeRootObjectToView|)
(|show|)))
(run)