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

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.

主站蜘蛛池模板: 邳州市| 鄄城县| 洛浦县| 伊川县| 汉寿县| 恩平市| 明水县| 卢湾区| 阳泉市| 伊金霍洛旗| 江口县| 那坡县| 海安县| 福泉市| 扬中市| 琼结县| 福鼎市| 库尔勒市| 沅陵县| 林甸县| 平安县| 仙游县| 长顺县| 盖州市| 秭归县| 两当县| 沛县| 江陵县| 合阳县| 工布江达县| 德兴市| 东源县| 呈贡县| 淳化县| 麟游县| 图木舒克市| 桐庐县| 上犹县| 社旗县| 湘乡市| 炎陵县|