Cursor and green square 16x16 at startup
-
Hello,
Something I always noticed but never solved because I was to leazy:
At sturtup usually qtembedded (QWS server) show a little green square 16x16 within a mouse pointer.
How can I remove it? (Now I have to...)
Hiding the mouse is not a solution because the little square remains.
And I can't recompile qt with the option "-no-feature-CURSOR".
Is this something we can do?Thanks!
-
Hi,
Can you show an image of that ?
-
Hi Ale82,
If I understand correctly, Your display is bigger in size and your Qt application size is smaller than that. Since you are not utilizing the complete screen, the rest left out space shows in green color.
Hope am correct. Because, even I do see the same behaviour here in my embedded target.
This is nothing to do with QWS server. Its just that you dont use the full space.
Suggest you to do develop the application which utilizes the full screen.
Hope it helps.
-
Sorry for reopening the old thread. I too see this green sqaure at the startup. Any solution for this issue ?
My display is 160 X 128 LCD. No touch screen, no mouse pointer.
Here is the code sample I have written
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
#ifdef Q_WS_QWS
QWSServer::setCursorVisible( false );
a.setOverrideCursor( QCursor( Qt::BlankCursor ) );
QWSServer::setBackground(QBrush(Qt::black));
#endifMainWindow w; w.setWindowFlags(Qt::Window | Qt::FramelessWindowHint); w.setStyleSheet("background-color: Black;"); w.show(); a.exec(); return a.exec();
}
Thank you
-
Did you add
update();
after turning it off, as mentioned before?The easiest way to turn the cursor off is to call your application with -nomouse, i.e.:
/bin/application -nomouse -qws
btw: If you have set the cursor invisible with
QWSServer::setCursorVisible( false );
, there's no need to set a blank override cursor. -
You can not call update() in main before any widget is created.
http://doc.qt.io/qt-4.8/qwidget.html#updateI do turn off/on the cursor from code if needed. After turning it off, the update() is needed.
On the application start, use the -nomouse and the application will start without cursor and there is no need to call update() at that point.So in your case, if you never need to see the cursor, you best start with -nomouse.