mirror of
https://gitlab.com/eql/EQL5.git
synced 2026-01-07 01:32:57 -08:00
fix QSELECT/QSEL to work with QQmlApplicationEngine created windows
This commit is contained in:
parent
f4550494ae
commit
e28e2a4af3
3 changed files with 39 additions and 19 deletions
14
examples/M-modules/quick/table-view/properties.lisp
Normal file
14
examples/M-modules/quick/table-view/properties.lisp
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
;;; properties dialog
|
||||
|
||||
(defun %sym (name package)
|
||||
(find-symbol (symbol-name name) package))
|
||||
|
||||
(defun show-properties-dialog (&optional item)
|
||||
"Lists all instance properties of a QML item (either a QQuickItem or an 'objectName'). If no item is passed, QML:*CALLER* will be used."
|
||||
(unless (find-package :properties)
|
||||
(load (in-home "gui/properties")))
|
||||
(funcall (%sym :show :properties)
|
||||
(or (if (stringp item)
|
||||
(qml:find-quick-item item)
|
||||
item)
|
||||
qml:*caller*)))
|
||||
|
|
@ -6,7 +6,8 @@
|
|||
|
||||
(qrequire :quick)
|
||||
|
||||
(require :qml-lisp "qml-lisp")
|
||||
(require :qml-lisp "qml-lisp")
|
||||
(require :properties "properties")
|
||||
|
||||
(defpackage :table-view
|
||||
(:nicknames :table)
|
||||
|
|
@ -56,7 +57,7 @@
|
|||
(|setFilterCaseSensitivity| *sort-filter-model* |Qt.CaseInsensitive|)
|
||||
(|setSourceModel| *sort-filter-model* *book-model*)
|
||||
;; view
|
||||
(setf qml:*quick-view* (qnew "QQmlApplicationEngine"))
|
||||
(setf qml:*quick-view* (qnew "QQmlApplicationEngine")) ; because of QML ApplicationWindow
|
||||
(|setContextProperty| (|rootContext| qml:*quick-view*) "sortFilterModel" *sort-filter-model*)
|
||||
(|load| qml:*quick-view* "qml/table-view.qml"))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue