mirror of
https://gitlab.com/eql/EQL5.git
synced 2025-12-08 19:40:35 -08:00
port of EQL/Qt4 to Qt5
This commit is contained in:
commit
0591f54ce8
339 changed files with 99935 additions and 0 deletions
25
examples/9-simple-lisp-editor/query-dialog.lisp
Normal file
25
examples/9-simple-lisp-editor/query-dialog.lisp
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
(defpackage :query-dialog
|
||||
(:use :common-lisp :eql)
|
||||
(:export
|
||||
#:*default-text*
|
||||
#:get-text))
|
||||
|
||||
(provide :query-dialog)
|
||||
|
||||
(in-package :query-dialog)
|
||||
|
||||
(defvar *default-text* "")
|
||||
|
||||
(defun get-text (message)
|
||||
(qlet ((dlg "QInputDialog(QWidget*,Qt::WindowFlags)" nil |Qt.WindowStaysOnTopHint|))
|
||||
(x:do-with dlg
|
||||
("setInputMode" |QInputDialog.TextInput|)
|
||||
("setWindowTitle" (tr "Query Dialog"))
|
||||
("setLabelText" message)
|
||||
("setTextValue" *default-text*)
|
||||
("resize" '(400 0)))
|
||||
(qlater (lambda () (x:do-with dlg "activateWindow" "raise")))
|
||||
(if (= |QDialog.Accepted| (! "exec" dlg))
|
||||
(! "textValue" dlg)
|
||||
"")))
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue