Results 1 to 3 of 3

Thread: rotation and mouse event identification

  1. #1
    Join Date
    Mar 2007
    Posts
    19
    Thanks
    2
    Qt products
    Qt3
    Platforms
    Unix/X11

    Question rotation and mouse event identification

    hi i m kiran
    i wnt to rotate the image is there any funtion by which i can rotate the img
    i want to zoom the part of img selected by the mouse so i hav to find the coordinates selected by mouse so is there any way to select the mouse coordinates

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: rotation and mouse event identification

    You have mouse coordinates in all mouse events and you can rotate an image either by creating a new image, opening a painter on it, rotating the painter and drawing the original image on it or by simply drawing the original image rotated (by rotating the widget painter) in the first place.

  3. #3
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: rotation and mouse event identification

    U can use void QPainter::rotate ( qreal angle) for rotating images thru a painter,

    and for capturing mouse events u can override mousePressEvent, and get the position of the mouse by event->pos() .

    Hope this helps

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.