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
0 0
原创粉丝点击