Skip to content

SvgGenerator

Qt Base Class: QSvgGenerator

Signature: QSvgGenerator(self) -> None QSvgGenerator(self, version: PySide6.QtSvg.QSvgGenerator.SvgVersion) -> None

Base classes

Name Children Inherits
PaintDeviceMixin
prettyqt.gui.paintdevice
QSvgGenerator
PySide6.QtSvg
QSvgGenerator(self) -> None

⋔ Inheritance diagram

graph TD
  1473374543328["svg.SvgGenerator"]
  1473245548480["gui.PaintDeviceMixin"]
  140713234304496["builtins.object"]
  1473369408960["QtSvg.QSvgGenerator"]
  1473300082368["QtGui.QPaintDevice"]
  1473291690208["Shiboken.Object"]
  1473245548480 --> 1473374543328
  140713234304496 --> 1473245548480
  1473369408960 --> 1473374543328
  1473300082368 --> 1473369408960
  1473291690208 --> 1473300082368
  140713234304496 --> 1473291690208

🛈 DocStrings

Bases: PaintDeviceMixin, QSvgGenerator

Source code in prettyqt\svg\svggenerator.py
class SvgGenerator(gui.PaintDeviceMixin, QtSvg.QSvgGenerator):
    def get_viewbox(self) -> core.Rect:
        return core.Rect(self.viewBox())

    def get_viewboxf(self) -> core.RectF:
        return core.RectF(self.viewBoxF())

    def get_size(self) -> core.Size:
        return core.Size(self.size())

    def set_size(self, size: datatypes.SizeType | core.QSizeF):
        self.setSize(datatypes.to_size(size))