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. How to hide mouse cursor while running application?

How to hide mouse cursor while running application?

Scheduled Pinned Locked Moved Solved Mobile and Embedded
7 Posts 2 Posters 555 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.
  • B Offline
    B Offline
    Bonty
    wrote on 17 Jun 2024, 11:12 last edited by
    #1

    Hi,

    How to hide mouse cursor while running application on walyand/weston.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 19 Jun 2024, 16:45 last edited by
      #6

      It might be a Wayland issue. One thing you can try is set a transparent image for the cursor.

      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
      • S Offline
        S Offline
        SGaist
        Lifetime Qt Champion
        wrote on 17 Jun 2024, 18:44 last edited by
        #2

        Hi,

        Use the setOverrideCursor method with qt::BlankCursor.

        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
        • B Offline
          B Offline
          Bonty
          wrote on 18 Jun 2024, 04:08 last edited by
          #3

          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!

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 18 Jun 2024, 21:05 last edited by
            #4

            You need to provide more information such as:

            • Qt version
            • OS
            • If Linux, distribution and window manager

            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
            • B Offline
              B Offline
              Bonty
              wrote on 19 Jun 2024, 04:54 last edited by Bonty
              #5
              • QT version = Qt5.15
              • OS = Linux (Yocto based linux)
              • Wayland/Weston Desktop
              1 Reply Last reply
              0
              • S Offline
                S Offline
                SGaist
                Lifetime Qt Champion
                wrote on 19 Jun 2024, 16:45 last edited by
                #6

                It might be a Wayland issue. One thing you can try is set a transparent image for the cursor.

                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
                • B Offline
                  B Offline
                  Bonty
                  wrote on 22 Jun 2024, 10:50 last edited by
                  #7

                  Thanks @SGaist

                  Transparent image by QPixmap is working.

                  1 Reply Last reply
                  0
                  • B Bonty has marked this topic as solved on 22 Jun 2024, 10:50

                  1/7

                  17 Jun 2024, 11:12

                  • Login

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