Results 1 to 2 of 2

Thread: Mouse Event

  1. #1
    Join Date
    Jan 2010
    Posts
    3
    Qt products
    Qt4
    Platforms
    Windows

    Default Mouse Event

    Hi,

    I am new to QT and C++ programming but I have experience programming. I need to know the mouse position when it is clicked. I know there is class for this purpose but I don't know exaactly how I can use it. Can anybody show a basic example with mouse event?

    Thanks

  2. #2
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Mouse Event

    QMouseEvent will give you a QPoint reference, so you can simply use the 'x' and 'y' members of that class to get the position at the time of the event.

    There are plenty of examples that come with Qt which demonstrate this class.

Similar Threads

  1. How to keep the mouse event?
    By oscar721 in forum Qt Programming
    Replies: 1
    Last Post: 27th October 2009, 09:48
  2. Mouse & KeyBoard Event
    By anafor2004 in forum Newbie
    Replies: 2
    Last Post: 26th October 2009, 11:39
  3. Mouse Event
    By sujan.dasmahapatra in forum Qt Programming
    Replies: 2
    Last Post: 19th February 2009, 11:40
  4. mouse event: right button
    By mattia in forum Newbie
    Replies: 1
    Last Post: 30th October 2007, 08:00
  5. Mouse over event
    By merry in forum Qt Programming
    Replies: 12
    Last Post: 16th May 2007, 11:13

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.