Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Treatment of rotated items in QGraphicsLayout

    General and Desktop
    1
    1
    584
    Loading More Posts
    • 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.
    • A
      Asperamanca last edited by

      I am trying to create an editor based on GraphicsView, where the user is able to do two things (among others):

      1. rotate items
      2. put items into layouts

      Initial tests show that this does not look to be a happy combination. When I simply call "rotate" on the item, it will be placed inside the layout like it was unrotated, and is THEN rotated for display.

      Now, if I rotate a rectangle by 45°, it's resulting bounding rectangle will be larger, and I had hoped the layout would take that into account.

      Am I missing something? Is there a way to make the layout respect item rotation (other than reimplementing geometry(), setGeometry(), minimumSize, ... for every single item)?

      1 Reply Last reply Reply Quote 0
      • First post
        Last post