Results 1 to 5 of 5

Thread: How to program a mouse event?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Join Date
    Jun 2015
    Location
    India
    Posts
    185
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    8
    Thanked 14 Times in 14 Posts

    Default Re: How to program a mouse event?

    Replace Qcursor:os() with your widget position and maptoGlobal(thatPosition) as next parameter.

    in your case :
    Qpoint point =yourWidget->geometry().center();
    Qpoint glbPos = yourWidget->maptoGlobal(point);

    sorry I could not type well as I'm replying from my phone.
    Last edited by prasad_N; 24th June 2015 at 21:06.
    Thanks :-)

Similar Threads

  1. Ogre+qt mouse event (add object with mouse problem)
    By rimie23 in forum Qt Programming
    Replies: 7
    Last Post: 24th April 2012, 10:49
  2. Replies: 14
    Last Post: 17th January 2012, 09:01
  3. Replies: 3
    Last Post: 7th January 2012, 08:38
  4. Mouse Event - source of event?
    By PowerPlate in forum Qt Programming
    Replies: 1
    Last Post: 27th October 2011, 09:46
  5. Replies: 3
    Last Post: 12th May 2010, 13:11

Tags for this Thread

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
  •  
Qt is a trademark of The Qt Company.