Qt禁用鼠标之后的问题
来源:互联网 发布:游戏币交易平台源码 编辑:程序博客网 时间:2024/05/17 02:57
在app初始化之后调用 QWSServer::setCursorVisible(FALSE);
但是有如下问题:
程序自动启动运行时,qt界面出现之前在屏幕中心位置还是会短暂出现一下光标
解决方法:
1. 重编Qt库,禁用鼠标功能
2.
---
src/gui/embedded/qwscursor_qws.cpp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/gui/embedded/qwscursor_qws.cpp b/src/gui/embedded/qwscursor_qws.cpp
index 439d412..5a2e0a4 100644
--- a/src/gui/embedded/qwscursor_qws.cpp
+++ b/src/gui/embedded/qwscursor_qws.cpp
<at> <at> -344,7 +344,7 <at> <at> void QWSServerPrivate::initializeCursor()
// default cursor
cursor = 0;
- setCursor(QWSCursor::systemCursor(Qt::ArrowCursor));
+ setCursor(QWSCursor::systemCursor(Qt::BlankCursor));
#endif
q->sendMouseEvent(QPoint(swidth/2, sheight/2), 0);
}
参考:
http://comments.gmane.org/gmane.comp.lib.qt.embedded/1379
但是有如下问题:
程序自动启动运行时,qt界面出现之前在屏幕中心位置还是会短暂出现一下光标
解决方法:
1. 重编Qt库,禁用鼠标功能
2.
---
src/gui/embedded/qwscursor_qws.cpp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/gui/embedded/qwscursor_qws.cpp b/src/gui/embedded/qwscursor_qws.cpp
index 439d412..5a2e0a4 100644
--- a/src/gui/embedded/qwscursor_qws.cpp
+++ b/src/gui/embedded/qwscursor_qws.cpp
<at> <at> -344,7 +344,7 <at> <at> void QWSServerPrivate::initializeCursor()
// default cursor
cursor = 0;
- setCursor(QWSCursor::systemCursor(Qt::ArrowCursor));
+ setCursor(QWSCursor::systemCursor(Qt::BlankCursor));
#endif
q->sendMouseEvent(QPoint(swidth/2, sheight/2), 0);
}
参考:
http://comments.gmane.org/gmane.comp.lib.qt.embedded/1379
0 0
- Qt禁用鼠标之后的问题
- 禁用cookie之后 jsessionid的重写问题
- 禁用鼠标右键的方法
- Qt的鼠标事件
- QT鼠标左键按下,鼠标样式改变,释放之后,鼠标样式还原
- 禁止鼠标选中,禁用鼠标右键的代码
- 装好office之后,鼠标右键不显示word和excel的问题
- Qt鼠标事件 我的鼠标样式
- GridView禁用掉viewstate之后的新建,编辑,删除
- QT 等待鼠标的设置
- QT鼠标事件的总结
- qt鼠标的小例子
- 解决Tslib移植之后自己编写的QT程序不能使用触屏的问题
- 禁用复制赋值的问题
- QT界面,鼠标滚轮实现缩放问题
- QT界面,鼠标滚轮实现缩放问题
- java禁用鼠标
- 禁用鼠标右键代码
- 云原生应用的设计理念与挑战
- ORACLE 用户 表 表空间之间的 关系
- jsp页面使用标签格式化数字或时间
- ≪统计学习精要(The Elements of Statistical Learning)≫课堂笔记(七)
- Android组件化实战
- Qt禁用鼠标之后的问题
- mina框架之一
- web.xml中classpath和classpath*的区别
- ≪统计学习精要(The Elements of Statistical Learning)≫课堂笔记(八)
- WPF样式的使用
- mina框架之二
- ≪统计学习精要(The Elements of Statistical Learning)≫课堂笔记(九)
- Leetcode 156. Binary Tree Upside Down (Medium) (cpp)
- ubuntu下 apache2 开启/关闭模块方法