Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Cursor and green square 16x16 at startup
QtWS25 Last Chance

Cursor and green square 16x16 at startup

Scheduled Pinned Locked Moved Mobile and Embedded
10 Posts 5 Posters 3.2k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    ale82
    wrote on last edited by
    #1

    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!

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Can you show an image of that ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • A Offline
        A Offline
        ale82
        wrote on last edited by
        #3

        It's the classic square in the middle of the screen everyone saw one time in his qt-life, nothing special. Anyway I'm sorry but I didn't find an image to link.

        1 Reply Last reply
        0
        • A Offline
          A Offline
          ale82
          wrote on last edited by
          #4

          I'm talking about QtEmbedded

          1 Reply Last reply
          0
          • K Offline
            K Offline
            kumararajas
            wrote on last edited by
            #5

            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.

            --Kumar

            1 Reply Last reply
            0
            • McLionM Offline
              McLionM Offline
              McLion
              wrote on last edited by
              #6

              You need to call update(); after turning off the Mousepointer in QWS.

              1 Reply Last reply
              0
              • V Offline
                V Offline
                vk41286
                wrote on last edited by
                #7

                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));
                #endif

                MainWindow w;
                w.setWindowFlags(Qt::Window | Qt::FramelessWindowHint);
                w.setStyleSheet("background-color: Black;");
                
                
                w.show();
                a.exec();
                return a.exec();
                

                }

                Thank you

                1 Reply Last reply
                0
                • McLionM Offline
                  McLionM Offline
                  McLion
                  wrote on last edited by McLion
                  #8

                  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.

                  1 Reply Last reply
                  0
                  • V Offline
                    V Offline
                    vk41286
                    wrote on last edited by vk41286
                    #9

                    Where to add the update() function.

                    I get this error :
                    main.cpp: In function ‘int main(int, char**)’:
                    main.cpp:72:9: error: ‘update’ was not declared in this scope

                    I have added before Mainwindow w; line.

                    1 Reply Last reply
                    0
                    • McLionM Offline
                      McLionM Offline
                      McLion
                      wrote on last edited by McLion
                      #10

                      You can not call update() in main before any widget is created.
                      http://doc.qt.io/qt-4.8/qwidget.html#update

                      I 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.

                      1 Reply Last reply
                      0

                      • Login

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • Users
                      • Groups
                      • Search
                      • Get Qt Extensions
                      • Unsolved