Results 1 to 6 of 6

Thread: Rotation problem

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2006
    Posts
    34
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Rotation problem

    Hi all,

    I am new to Qt, currently I am using Qt 4 on Linux. I am writing a application similar to the "draggableicons" sample. All I need is icons should rotate say 40 degrees when we right click on it. Can some body explain how to do it? Here is the code I have modified
    in the draggableicons sample, but it doesnt work

    Qt Code:
    1. void DragWidget::mousePressEvent(QMouseEvent *event)
    2. {
    3. .
    4. .
    5. .
    6. QPixmap tempPixmap = pixmap;
    7. QPainter painter;
    8. painter.begin(&tempPixmap);
    9. //rotate abt 60 degrees
    10. painter.rotate(60);
    11. painter.fillRect(pixmap.rect(), QColor(127, 127, 127, 127));
    12. painter.end();
    13. .
    14. .
    15. .
    16.  
    17. }
    To copy to clipboard, switch view to plain text mode 

    Thanks in advance,
    Prasanna Bhat
    Last edited by wysota; 17th January 2007 at 16:53. Reason: missing [code] tags

Similar Threads

  1. QTimer problem ... it runs but never triggs
    By yellowmat in forum Newbie
    Replies: 4
    Last Post: 4th July 2006, 12:54
  2. Grid Layout Problem
    By Seema Rao in forum Qt Programming
    Replies: 2
    Last Post: 4th May 2006, 12:45
  3. Problem with bitBlt
    By yellowmat in forum Newbie
    Replies: 1
    Last Post: 5th April 2006, 14:08
  4. fftw problem
    By lordy in forum General Programming
    Replies: 1
    Last Post: 16th March 2006, 21:36
  5. Replies: 16
    Last Post: 7th March 2006, 15:57

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.