How to hide mouse cursor while running application?
Solved
Mobile and Embedded
-
wrote on 17 Jun 2024, 11:12 last edited by
Hi,
How to hide mouse cursor while running application on walyand/weston.
-
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
. -
wrote on 18 Jun 2024, 04:08 last edited by
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
-
wrote on 19 Jun 2024, 04:54 last edited by Bonty
- QT version = Qt5.15
- OS = Linux (Yocto based linux)
- Wayland/Weston Desktop
-
It might be a Wayland issue. One thing you can try is set a transparent image for the cursor.
-
1/7