Details
-
Bug
-
Resolution: Incomplete
-
Not Evaluated
-
None
-
4.7.3
-
Qt 4.7.3, PySide 1.0.2, Python 2.6, Mac OS X 10.5
Description
The documentation for QGraphicsItem (the base class for QGraphicsSvgItem) states that their default cache mode is NoCache. Yet QGraphicsSvgItems actually have a default cache mode of DeviceCoordinateCache. This causes QGraphicsSvgItems to be pixelated when saved to SVG files via QSvgGenerator. The resulting SVG files are, unfortunately, not scalable. In contrast, setting the items' cache mode to NoCache results in SVG files composed of scalable vectors, as one would expect for SVG files.
Ideally, the cache mode of a QGraphicsSvgItem would be ignored when it was being rendered to a QSvgGenerator paint device. Then a cache mode of DeviceCoordinateCache would ensure that SVG items were cached when rendered to a QGraphicsView, but not when saved to an SVG file.