3 Star 2 Fork 4

sun/Qt5

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
使用步骤:

一、程序中包含systemShortCut.h(系统热键)

二、创建对象:
参数一、快捷键的字符串 ctrl/shift/alt + 键盘按键的字符(如F2等)
参数二、接收信息的窗体对象,需要传入一个窗体类
SystemShortCut *shortcut = new SystemShortCut("ctrl+n", this);

三、绑定事件:
信号:只有actived一个信号
connect(shortcut,&SystemShortCut::actived,this,&Widget::close);

若要修改快捷方式 需要删除 重新创建对象 并重新绑定事件
delete shortcut;
shortcut = new SystemShortCut("ctrl+p", this);
connect(shortcut,&SystemShortCut::actived,this,&Widget::close);
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/mrzs2020/qt5-learn.git
git@gitee.com:mrzs2020/qt5-learn.git
mrzs2020
qt5-learn
Qt5
master

搜索帮助