Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Set sub mouse cursor?

Set sub mouse cursor?

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 1.1k 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
    Adelost
    wrote on last edited by
    #1

    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
    0
    • A Offline
      A Offline
      akonradwesolutions
      wrote on last edited by
      #2

      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
      0
      • A Offline
        A Offline
        Adelost
        wrote on last edited by
        #3

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

        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