Set sub mouse cursor?
General and Desktop
3
Posts
2
Posters
1.1k
Views
1
Watching
-
wrote on 28 Apr 2013, 18:35 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)!
-
wrote on 28 Apr 2013, 19:59 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.
-
wrote on 29 Apr 2013, 05:35 last edited by
Thanks! Not as easy as I would have hoped, but at least it is doable.
1/3