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

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.

主站蜘蛛池模板: 苍山县| 扶风县| 阳泉市| 邓州市| 东阿县| 宁国市| 呼和浩特市| 卢氏县| 北碚区| 麻城市| 泗水县| 辽阳县| 佛坪县| 舞阳县| 栾城县| 永登县| 合肥市| 手机| 石渠县| 浦江县| 同德县| 绍兴县| 夏河县| 新昌县| 微山县| 东兰县| 慈溪市| 岳阳县| 军事| 湘阴县| 罗田县| 巴中市| 阳原县| 阜宁县| 东阿县| 汶上县| 安乡县| 金乡县| 富平县| 梅州市| 常宁市|