initial import
src/hello-world-quit.lisp
Sun Apr 5 17:36:46 CEST 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
* initial import
--- old-qt.examples/src/hello-world-quit.lisp 1970-01-01 01:00:00.000000000 +0100
+++ new-qt.examples/src/hello-world-quit.lisp 2014-10-30 07:39:43.000000000 +0100
@@ -0,0 +1,20 @@
+(in-package :qt.examples)
+
+(defun hello-world-quit ()
+ "Quit on push-button click"
+ (qt:with-app
+ (let ((quit (make-instance 'qt:push-button :args '("Quit")))
+ (font (make-instance 'qt:font :args (list "Times"
+ 18
+ (value qt:font.+bold+)))))
+ (cxx:resize quit 75 30)
+ (cxx:set-font quit font)
+
+ (qt:connect (qt:get-signal quit "pressed()")
+ #'(lambda ()
+ (format t "About to quit()~%")))
+
+ (qt:connect (qt:get-signal quit "clicked()")
+ (qt:get-slot (qt:app) "quit()"))
+ (cxx:show quit)
+ (qt:exec quit))))