Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Hide Cursor in QML
Forum Updated to NodeBB v4.3 + New Features

Hide Cursor in QML

Scheduled Pinned Locked Moved QML and Qt Quick
9 Posts 2 Posters 10.1k Views 1 Watching
  • 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.
  • K Offline
    K Offline
    kyleplattner
    wrote on last edited by
    #1

    I am deploying to a touch screen display unit and I would like to hide my cursor, is this possible with QML?

    1 Reply Last reply
    0
    • K Offline
      K Offline
      Kxyu
      wrote on last edited by
      #2

      no, as far as I know. you should make your own wrapper or modify qmlviewer

      also i want to warn you about a possible problem. some touch screen drivers don't set a cursor to new position immediately when you touch the screen, but only after move or release. this can spoil user experience for buttons, as the will not look pressed, when you expect. I had this problem with Windows 7, in Ubuntu 10.10 everything's ok

      1 Reply Last reply
      0
      • K Offline
        K Offline
        kyleplattner
        wrote on last edited by
        #3

        is there an instruction I can pass to qmlviewer to test possibilities for the wrapper?

        1 Reply Last reply
        0
        • K Offline
          K Offline
          Kxyu
          wrote on last edited by
          #4

          what kind of possibilities?

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

            I am used to being able to pass instructions like -qws -frameless -dragthreshold 25 along with the qmlviewer command. What could I try for hiding the cursor?

            1 Reply Last reply
            0
            • K Offline
              K Offline
              Kxyu
              wrote on last edited by
              #6

              there is no such option in original qmlviewer, you should implement it yourself

              1 Reply Last reply
              0
              • K Offline
                K Offline
                kyleplattner
                wrote on last edited by
                #7

                I'll look into it. Thanks

                1 Reply Last reply
                0
                • K Offline
                  K Offline
                  Kxyu
                  wrote on last edited by
                  #8

                  it's no so difficult. looks like

                  @
                  QPixmap nullCursor(16, 16);
                  nullCursor.fill(Qt::transparent);
                  if (opts.nocursor)
                  app.setOverrideCursor(QCursor(nullCursor));
                  @

                  added to main function of qmlviewer

                  1 Reply Last reply
                  0
                  • K Offline
                    K Offline
                    kyleplattner
                    wrote on last edited by
                    #9

                    I appreciate the help.

                    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