Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QGraphicsItemAnimation setRotateAt rotates around scene 0,0 how do i set it to rotate around QGraphicsItem center

QGraphicsItemAnimation setRotateAt rotates around scene 0,0 how do i set it to rotate around QGraphicsItem center

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 1.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    icewhite1981
    wrote on last edited by
    #1

    For several reasons (the biggest of which is the legacy codebase I am working with) I am forced to use QGraphicsItemAnimation to animate QGraphicsItems on our scene I am trying to implement a simple rotate animation for test purposes. I have implemented the code and the item rotates almost as expected. However the Rotation is around the 0,0 of the scene rather than the 0,0 of the Item. Ideally I would like the rotation to occur around the center of the QGraphicsItem

    Any ideas on how I can achieve this calling setTransformOriginPoint doesn't work and to be honest I don't really want to change the item I am animating in anyway. Can this be done just using the QGraphicsItemAnimation so the translation to rotate around item center can be applied on a temporary basis. If this is not possible any thoughts as to how I can achieve this generally if a solution cannot be applied to the animation object.

    Please note I have tried applying the translation using the QGraphicsItemAnimation function setTranslationAt

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved