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

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.

主站蜘蛛池模板: 高邮市| 天水市| 五指山市| 沙洋县| 淮安市| 怀仁县| 临夏县| 宁乡县| 神池县| 玉溪市| 淳安县| 贡觉县| 乐平市| 莎车县| 武汉市| 棋牌| 勃利县| 涡阳县| 南木林县| 绥中县| 罗源县| 大荔县| 太保市| 怀来县| 保康县| 桂东县| 永定县| 衡水市| 交城县| 澜沧| 黄骅市| 秦皇岛市| 邹平县| 从化市| 武穴市| 唐山市| 岑巩县| 昭觉县| 龙门县| 太仆寺旗| 阿克|