Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Get a shape from an SVG ?
Adam Crowe last edited by
I have a custom QGraphicsObject control which draws a shape from an SVG file. This works wonderfully except that I also implement the hover events which although also work, I'm having trouble with getting the shape out this SVG file without having to manually recreate its path and returning it in the shape() override.
I'm sure it's asking a lot, but is there a way out there to get a QSvgRenderer to return the file's outer path? Something simple like:
QPainterPath path; path.addPolygon(mySvgRenderer->getPolygonShape()); return path;
Life can't be that simple, right…?
DDraw last edited by
A Former User last edited by
is there a way out there to get a QSvgRenderer to return the file's outer path?