Make File→Exit button functional
Lays groundwork for signal callbacks.
This commit is contained in:
parent
b7aca5eba3
commit
ce486ef5f6
10
contact.scm
10
contact.scm
|
@ -41,7 +41,17 @@
|
||||||
|
|
||||||
;; Initialize the window.
|
;; Initialize the window.
|
||||||
(define (init-window window)
|
(define (init-window window)
|
||||||
|
(window-callbacks window)
|
||||||
(qt:show window))
|
(qt:show window))
|
||||||
|
|
||||||
|
|
||||||
|
;; Connect callback functions to widgets’ signals.
|
||||||
|
(define (window-callbacks window)
|
||||||
|
(let ([file→exit (qt:find window "actionQuit")])
|
||||||
|
(if file→exit
|
||||||
|
(qt:connect
|
||||||
|
file→exit "triggered()"
|
||||||
|
(qt:receiver exit)))))
|
||||||
|
|
||||||
|
|
||||||
(init)
|
(init)
|
||||||
|
|
Ŝarĝante…
Reference in New Issue