Results 1 to 3 of 3

Thread: how to rotate a rectangular region of awidget

  1. #1
    Join Date
    Nov 2007
    Posts
    291
    Thanks
    85
    Thanked 1 Time in 1 Post

    Default how to rotate a rectangular region of awidget

    hi
    how to rotate a part of the rectangular area inside widgets area.

    suppose a widget has a size of QRect(0,0 700x500) now if i want to rotate the area of rectangle QRect(10,10,30,20) with respect to QPoint(10,10) , how to rotate it.

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

    Default Re: how to rotate a rectangular region of awidget


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

    babu198649 (18th March 2008)

  4. #3
    Join Date
    Jun 2007
    Posts
    62
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    28
    Thanked 1 Time in 1 Post

    Default Re: how to rotate a rectangular region of awidget

    You may or may not find this code useful.
    Go to
    http://labs.trolltech.com/page/Graphics/Examples
    and use Subversion to fetch QTransform 2
    When the demo is set to rotate around the Z axis, it is probably doing what you want.

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.