Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Set sub mouse cursor?

    General and Desktop
    2
    3
    921
    Loading More Posts
    • 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
      Adelost last edited by

      Is it possible to, not only change mousecursor, but to set a sub mouse cursor (similar to the picture)?

      !http://i.imgur.com/QqYJ9Kc.png(Sub mousecursor)!

      1 Reply Last reply Reply Quote 0
      • A
        akonradwesolutions last edited by

        AFAIK the mouse cursor always is a single image. I'm pretty sure that goes for the cursor on your image, too. You can use an arbitrary QPixmap to create a QCursor and use it just like the predefined cursors:

        @
        QPixmap myPixmap(":/path/to/cursor/image");
        int hotspot = 0, hotspotY = 0;
        QCursor myCursor(myPixmap, hotspotX, hotspotY);
        @

        That way you can create every kind of special cursor you might need.

        1 Reply Last reply Reply Quote 0
        • A
          Adelost last edited by

          Thanks! Not as easy as I would have hoped, but at least it is doable.

          1 Reply Last reply Reply Quote 0
          • First post
            Last post