Results 1 to 2 of 2

Thread: QGraphicsRectItem::rotate()

  1. #1
    Join Date
    Jan 2006
    Posts
    1
    Thanks
    1
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Red face QGraphicsRectItem::rotate()

    Hi, All!

    How to rotate a QGraphicsRectItem concerning an any point of a
    QGraphicsScene?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QGraphicsRectItem::rotate()

    Qt Code:
    1. rect.translate( -anyPoint.x(), -anyPoint.y() );
    2. rect.rotate( angle );
    3. rect.translate( anyPoint.x(), anyPoint.y() );
    To copy to clipboard, switch view to plain text mode 

  3. The following user says thank you to jacek for this useful post:

    LestorN (20th October 2006)

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.