[PyQt] missing QSvgRenderer.matrixForElement() in PyQt5

Phil Thompson phil at riverbankcomputing.com
Sun May 8 12:24:10 BST 2016


On 8 May 2016, at 12:05 pm, Wilbert Berendsen <wb at xs4all.nl> wrote:
> 
> Dear friends,
> 
> The QSvgRenderer.matrixForElement seems to be missing in PyQt5.
> 
> (Although documented in Qt-5.6:
> http://doc.qt.io/qt-5/qsvgrenderer.html#matrixForElement )
> 
> I need a way to find the logical coordinates of an element (using
> QSvgRenderer.boundsOnElement() and then applying the matrix returned by
> QSvgRenderer.matrixForElement()).
> 
> Is there any alternative way to get to the bounding boxes of elements?
> (besides parsing the SVG in Python and computing the bounding boxes of
> elements, or using QWebView and running a javascript in the
> document...)?
> 
> Why is QSvgRenderer.matrixForElement() missing?

Because QMatrix is obsolete and has never been implemented in PyQt5.

Phil


More information about the PyQt mailing list