qt触摸屏隐藏鼠标指针

方法1:运行加参数-nomouse

 

方法2:QWidget::setCursor(QCursor(Qt::BlankCursor)

例:this->setCursor(Qt::BlankCurror);

只希望在某个QWidget(或QDialog等)控件上不出现鼠标指针。其他窗口仍会显示鼠标指针。

 

方法3:main函数中调用QApplication::setOverrideCursor(Qt::BlankCurror);

 

方法4:main()函数加入 

#include <QWSServer>,实例化QApplication后,添加QWSServer::setCursorVisible(false);

注意:方法2和3只有在动一下触摸屏后鼠标才会消失,第4种在整个程序启动到运行都不会出现鼠标指针。

 

原文: https://blog.csdn.net/lmhuanying1012/article/details/78237938

posted @ 2019-08-21 17:33  cicero  阅读(1831)  评论(0编辑  收藏  举报