| Paste number 63904: | Qt tutorial 4 |
| Pasted by: | sohail |
| When: | 2 years, 1 month ago |
| Share: | Tweet this! | http://paste.lisp.org/+1DB4 |
| Channel: | None |
| Paste contents: |
(in-package :qt)
(defmacro qsignal (sig)
(concatenate 'string "2" sig))
(defmacro qslot (slot)
(concatenate 'string "1" slot))
(defparameter *app* (make-instance 'qlisp-application))
(defclass my-widget (qwidget) ())
(defmethod initialize-instance :after ((self my-widget)
&rest args)
(declare (ignore args))
(let ((quit (make-instance 'qpush-button
:text (make-instance 'qstring
:ch "Quit")
:parent self)))
(qwidget-set-geometry quit 62 40 75 30)
(qwidget-set-font quit (make-instance 'qfont
:family (make-instance 'qstring
:ch "Times")
:pointsize 18
:weight QFont-Bold))
(qobject-connect quit (qsignal "clicked()")
*app* (qslot "quit()"))))
(let ((widget (make-instance 'my-widget)))
(qwidget-show widget)
(qapplication-exec))
(sb-ext:quit)
This paste has no annotations.