How to hide mouse cursor while running application?
Solved
Mobile and Embedded
-
It might be a Wayland issue. One thing you can try is set a transparent image for the cursor.
-
Hi,
Use the setOverrideCursor method with
qt::BlankCursor
. -
Hi,
Thanks for your reply!
I have tried setOverrideCursor but its not working. Also I have tried on application still its not working. I am using Qt5.15.
int main(int argc, char *argv[]) { QApplication a(argc, argv); //a.setOverrideCursor(QCursor(Qt::BlankCursor)); //a.setOverrideCursor(Qt::BlankCursor); //QApplication.setOverrideCursor(QCursor(Qt::BlankCursor)); //QCursor cursor(Qt::BlankCursor); //QApplication::setOverrideCursor(cursor); //QApplication::changeOverrideCursor(cursor); QApplication::setOverrideCursor(QCursor(Qt::BlankCursor)); MainWindow w; //QCursor cursor(Qt::BlankCursor); //w.setCursor(cursor); //w.setCursor(QCursor(Qt::BlankCursor)); w.showFullScreen(); return a.exec(); }
Please help!
-
You need to provide more information such as:
- Qt version
- OS
- If Linux, distribution and window manager
-
It might be a Wayland issue. One thing you can try is set a transparent image for the cursor.
-