看到vs有炫酷的打字动效插件,心痒难耐,自己也想用上,可自己用的是QtCreator,无奈之下,只好用Qt写一个小软件,实现打字动效
1.QueryKeyThread类实现windows下光标位置识别和键盘按键识别
2.Widget类实现加载qml界面,并根据QueryKeyThread识别,触发界面通信
3.qml界面使用粒子实现动效
4.效果
理论上能识别windows上所有编辑框,但是在部分编辑软件中坐标有点偏差
参考之前的帖子
参考之前的帖子
为了生成开始菜单和桌面快捷方式,要修改installscript.qs文件
Component.prototype.createOperations = function() { // call default implementation to actually install README.txt! component.createOperations(); if (systemInfo.productType === "windows") { component.addOperation("CreateShortcut", "@TargetDir@/qmlDemoWinKeyKaTong.exe", "@StartMenuDir@/qmlDemoWinKeyKaTong.lnk", "workingDirectory=@TargetDir@", "iconPath=@TargetDir@/qmlDemoWinKeyKaTong.exe", "iconId=0", "description=@TargetDir@/qmlDemoWinKeyKaTong.exe"); component.addOperation("CreateShortcut", "@TargetDir@/qmlDemoWinKeyKaTong.exe", "@HomeDir@/Desktop/qmlDemoWinKeyKaTong.lnk", "workingDirectory=@TargetDir@", "iconPath=@TargetDir@/qmlDemoWinKeyKaTong.exe", "iconId=0", "description=@TargetDir@/qmlDemoWinKeyKaTong.exe"); } }下载地址
下载地址