mirror of
https://gitlab.com/eql/EQL5.git
synced 2025-12-13 05:40:25 -08:00
port of EQL/Qt4 to Qt5
This commit is contained in:
commit
0591f54ce8
339 changed files with 99935 additions and 0 deletions
29
examples/9-simple-lisp-editor/my.lisp
Normal file
29
examples/9-simple-lisp-editor/my.lisp
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
(in-package :eql-user)
|
||||
|
||||
(defvar *window* (qnew "QDialog"
|
||||
"windowTitle" "My Personal Analyst"))
|
||||
(defvar *label* (qnew "QLabel"
|
||||
"text" "Please enter your <b>Top Secret</b> (you will feel better)"))
|
||||
(defvar *line-edit* (qnew "QLineEdit"
|
||||
"echoMode" |QLineEdit.Password|))
|
||||
(defvar *layout* (qnew "QVBoxLayout(QWidget*)" *window*))
|
||||
|
||||
(defun start ()
|
||||
(x:do-with (qfun *layout* "addWidget")
|
||||
*label*
|
||||
*line-edit*)
|
||||
(qconnect *line-edit* "returnPressed()" 'analyze)
|
||||
(x:do-with *window* "show" "raise"))
|
||||
|
||||
(defun analyze ()
|
||||
(qlet ((dlg "QProgressDialog"
|
||||
"maximum" 20
|
||||
"labelText" "<h1 style='color:crimson'>Wow!</h1><p>(updating WikiLeaks...)</p>"))
|
||||
(x:do-with dlg "show" "raise")
|
||||
(dotimes (n (qget dlg "maximum"))
|
||||
(sleep 0.1)
|
||||
(qset dlg "value" n)
|
||||
(qprocess-events)))
|
||||
(qfun *line-edit* "clear"))
|
||||
|
||||
(start)
|
||||
Loading…
Add table
Add a link
Reference in a new issue