I am developing a Qt application for the embedded Linux system. The system is equipped with a touch screen as well as an OTG USB port, and it can be used with the mouse.
So, my problem is that when the application starts, it shows the mouse cursor in the middle of the screen, and then disappears when the main event event occurs.
When the application starts, I can hide / show the cursor if the mouse is connected, which works fine, but there is always a cursor during startup.
I tried: QWSServer :: setCursorVisible (false);
or: qApp-> setOverrideCursor (QCursor (Qt :: BlankCursor));
and the result will be the same as described above.
The only way I found to hide the cursor at startup time was to compile Qt without a cursor, but then I cannot have the cursor when the mouse is connected (this logic ...).
So, if you have an idea, I will be happy to read it :-)
Thank you Sylvain
EDIT: Okey so that the QWS server displaying the cursor at startup detects that in qt / src / gui / embedded / qwscursor_qws.cpp:
void QWSServerPrivate::initializeCursor() { Q_Q(QWSServer);
Now, if I comment on the "setCursor" instruction, which solves the problem, but so ugly to edit the Qt source code to do this, so if you have a better solution ...