qt-light/examples/custom-widgets/goodbye.scm
Jaidyn Ann 1704d392e8 Add “custom-widgets” example
This small example demonstrates defining and
binding to your own subclass of a QT widget.
2024-02-04 15:10:37 -06:00

13 lines
324 B
Scheme

(import qt-light goodbye-widgets protobj
(chicken io))
(define a (qt:init))
(define w (qt:widget (call-with-input-file "goodbye.ui" (lambda (p) (read-string #f p)))))
(print (? w pointer))
(define b (qt:find w "goodbyeButton"))
(print b)
(qt:connect b "clicked()" a "quit()")
(qt:show w)
(gb:saygoodbye b)
(qt:run)