Results 1 to 15 of 15

Thread: Rotate QGraphicsProxyWidget in QGraphicsView

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,368
    Thanks
    3
    Thanked 5,017 Times in 4,793 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Rotate QGraphicsProxyWidget in QGraphicsView

    What if you get rid of the "wi" widget and the layout? What if you call rotate() instead of setRotation()?
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  2. #2
    Join Date
    Jan 2008
    Location
    Poland
    Posts
    687
    Thanks
    4
    Thanked 140 Times in 132 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Rotate QGraphicsProxyWidget in QGraphicsView

    Qt Code:
    1. #include <QtCore>
    2. #include <QtGui>
    3.  
    4. int main(int argc, char **argv)
    5. {
    6. QApplication a(argc, argv);
    7. QGraphicsScene scene(-200,-200,400,400);
    8. gv.setScene(&scene);
    9. gv.setRenderHint(QPainter::Antialiasing);
    10. gv.setDragMode(QGraphicsView::ScrollHandDrag);
    11.  
    12. QPushButton btn("My Button");
    13. QGraphicsProxyWidget *pw = scene.addWidget(&btn);
    14. pw->setPos(0, 0);
    15. pw->rotate(-20);
    16. gv.show();
    17. return a.exec();
    18. }
    To copy to clipboard, switch view to plain text mode 
    gives:
    screen2.jpg
    I would like to be a "Guru"

    Useful hints (try them before asking):
    1. Use Qt Assistant
    2. Search the forum

    If you haven't found solution yet then create new topic with smart question.

  3. #3
    Join Date
    Jan 2010
    Posts
    95
    Thanks
    14
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Rotate QGraphicsProxyWidget in QGraphicsView

    Is there a solution to this problem ?

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

    Default Re: Rotate QGraphicsProxyWidget in QGraphicsView

    The solution is to use a widget style different than the native WindowsXP/Vista style. You may also browse the bug tracker to see if this bug was reported and fixed between 4.6.0 and 4.6.1. If so, you can download a patch and apply it to your 4.6.0 sources and rebuild the style. You may also downgrade to Qt 4.5.3
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  5. #5
    Join Date
    Jan 2008
    Location
    Poland
    Posts
    687
    Thanks
    4
    Thanked 140 Times in 132 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Rotate QGraphicsProxyWidget in QGraphicsView

    I would like to be a "Guru"

    Useful hints (try them before asking):
    1. Use Qt Assistant
    2. Search the forum

    If you haven't found solution yet then create new topic with smart question.

Similar Threads

  1. QGraphicsItem or QGraphicsProxyWidget?
    By ttvo in forum Qt Programming
    Replies: 5
    Last Post: 30th August 2009, 23:13
  2. performance of QWebKit() in QGraphicsProxyWidget
    By wagmare in forum Qt Programming
    Replies: 11
    Last Post: 8th December 2008, 10:26
  3. QGraphicsProxyWidget
    By QbelcorT in forum Qt Programming
    Replies: 0
    Last Post: 29th November 2008, 08:21
  4. window icon in QGraphicsProxyWidget
    By Maike.F in forum Qt Programming
    Replies: 1
    Last Post: 20th November 2008, 13:50
  5. problem with QGraphicsProxyWidget
    By dreamer in forum Qt Programming
    Replies: 5
    Last Post: 19th May 2008, 22:25

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.