官术网_书友最值得收藏!

Implementing the functions for the actions

In the previous section, we added several actions to the menu and toolbar. However, if we click on these actions, nothing happens. That's because we have not written any handler for them yet. Qt uses a signal and slot connection mechanism to establish the relationship between events and their handlers. When users perform an operation on a widget, a signal of that widget will be emitted. Then, Qt will ascertain whether there is any slot connected with that signal. The slot will be called if it is found. In this section, we will create slots for the actions we have created in the preceding sections and make connections between the signals of the actions to these slots respectively. Also, we will set up some hotkeys for frequently used actions.

主站蜘蛛池模板: 嘉祥县| 朝阳市| 灌南县| 赤壁市| 曲阜市| 酒泉市| 新乡县| 雷山县| 泗阳县| 镇远县| 新乐市| 克山县| 汨罗市| 两当县| 敖汉旗| 安远县| 界首市| 洛阳市| 西峡县| 武胜县| 江华| 湟中县| 大港区| 扶风县| 越西县| 周口市| 凤庆县| 新兴县| 龙海市| 梁山县| 建昌县| 大新县| 清镇市| 阜新市| 静海县| 韶关市| 启东市| 玉田县| 民权县| 通化县| 色达县|