Results 1 to 4 of 4

Thread: How to change the mouse pointer over an image

  1. #1
    Senior Member
    Join Date
    Feb 2012
    Posts
    1,230

    How to change the mouse pointer over an image

    Hi,

    Looking at the forms docs, I see there are some options for changing the mouse pointer.

    How would I change that over an image? I am looking to show the mouse as a grab hand while moving an image.

    This from the forms docs:
    Mouse pointer: 0 = arrow, 1 = arrow, 2 = cross, 3 = I-beam, 5 = size, 6 = NE/SW, 7 = size N/S, 8 = size NW/SE, 9 = size W/E, 10 = up arrow, 12 = no drop, 15 = pointing hand

    Thanks

    Herb

  2. #2
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,460
    Hi Herb,

    Can you give more details? Are you seeing it change back to a default as you move the image or are you yet to try changing the form property value?

    Regards,

    Yvonne

  3. #3
    Senior Member
    Join Date
    Feb 2012
    Posts
    1,230
    Hi Yvonne,

    I want to be able to specify a mouse pointer via the code. There are times when I want to draw on an image, and other times that I want to drag an image.
    It would depend on a state flag that I use. However, the action would need to be associated with a cursor change so that the user knows what mode they are in.

    I think that would entail exposing QCursor::setShape()

    Thanks

    Herb

  4. #4
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    5,962
    myobj.mousecursor = nExp
    Last edited by barrymavin; 2020-08-08 at 04:57.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us