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. How to resize/scale a QGraphicsSvgItem?
Forum Updated to NodeBB v4.3 + New Features

How to resize/scale a QGraphicsSvgItem?

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 1.4k 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.
  • J Offline
    J Offline
    jeevan_reddy
    wrote on last edited by
    #1

    I have a QGraphicsSvgItem which is currently displayed on the graphics scene. The svg image is rectangular in shape. My requirement is that I need to resize the svg image by clicking on the either sides or top and bottom of the rectangle.

    I believe, I need to reimplement QGraphicsSvgItem::mouseMoveEvent(). But I'm not sure how to scale the svg item during the mouse move event along with the bounding rect? I am able to resize the image rect by obtaining the QSvgRenderer's viewBox . Currently the svg image doesn't scale along with the rect.
    Any help is apprecited.

    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