Add a Quit button to end the program.
加上一个退出按钮,使得可以退出程序。
A "Quit" button (to communicate with the overall application).
“Quit”按钮(用来与整个应用程序通信)。
Two signal handlers are connected — one to quit the application when the user closes the window and another to change the greeting that is displayed when the user clicks the button.
两个信号处理器被连接起来——一个用来在用户关闭窗口时退出应用程序,另一个用来在用户点击按钮时,修改显示的欢迎信息。
应用推荐