Assign shortcut keys to buttons - Qt C++

前端 未结 4 2047
野趣味
野趣味 2021-01-31 18:17

I have created a GUI using Qt Creator. That is by drag and drop the widgets. Now I want to assign shortcut keys for all of the buttons. Can anyone here please let me know how to

4条回答
  •  误落风尘
    2021-01-31 18:51

    Today (Qt5.7), we can assign shortcuts directly in Qt Designer using the shortcut property:

    Pretty handy.. Even if a bit buggy: I have to "validate" the shortcut by clicking on another property of the same widget before switching to another widget!

    But it works.

提交回复
热议问题