Results 1 to 1 of 1

Thread: How to rotate correctly after changing the QGraphicsItem size

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    May 2016
    Posts
    1
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Unhappy How to rotate correctly after changing the QGraphicsItem size

    Hello.

    I'm making a Diagram program and for days I'm stuck with some issue:
    i have a customer QMyGraphicsRectItem which inherit QGraphicsItem ,when i drawing a rect in scene, Followed by rotate and then resize .Again this time of rotation, rect position will be change,i donot know why?

    item.zip is Screen recording program。It can be found that there is a significant jitter in the second rotation。
    drawcli.zip is src.

    I'd appreciate any advice. Thanks!

    mousePressEvent call setTransformOriginPoint change item's OriginPoint
    1.png


    mouseMoveEvent change angle
    2.png

    demo ui
    3.png
    Attached Files Attached Files

Similar Threads

  1. Replies: 0
    Last Post: 9th December 2014, 17:30
  2. QPainter::rotate problem in QGraphicsItem
    By alizadeh91 in forum Qt Programming
    Replies: 2
    Last Post: 23rd August 2012, 22:02
  3. Replies: 1
    Last Post: 30th March 2012, 16:46
  4. Changing a QGraphicsItem's transparency as a whole
    By blooglet in forum Qt Programming
    Replies: 4
    Last Post: 5th May 2011, 13:19
  5. Changing QLineEdit's size
    By Wasabi in forum Newbie
    Replies: 7
    Last Post: 18th October 2010, 18:46

Tags for this Thread

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.