Skip to content

PaintDeviceMixin

Sub classes

Name Children Inherits
PaintDevice
prettyqt.gui.paintdevice
The base class of objects that can be painted on with QPainter.
    PaintDeviceWindowMixin
    prettyqt.gui.paintdevicewindow
    PixmapMixin
    prettyqt.gui.pixmap
    Off-screen image representation that can be used as a paint device.
    Image
    prettyqt.gui.image
    Hardware-independent image representation with direct access to the pixel data.
      PagedPaintDeviceMixin
      prettyqt.gui.pagedpaintdevice
      Picture
      prettyqt.gui.picture
      Paint device that records and replays QPainter commands.
        WidgetMixin
        prettyqt.widgets.widget
        SvgGenerator
        prettyqt.svg.svggenerator

          🛈 DocStrings

          Source code in prettyqt/gui/paintdevice.py
          class PaintDeviceMixin:
              def get_metric(self, metric: MetricStr | QtGui.QPaintDevice.PaintDeviceMetric) -> int:
                  """Return metric information.
          
                  Args:
                      metric: metric information to get
          
                  Returns:
                      metric information
                  """
                  return self.metric(METRICS.get_enum_value(metric))
          

          get_metric(metric: MetricStr | QtGui.QPaintDevice.PaintDeviceMetric) -> int

          Return metric information.

          Parameters:

          Name Type Description Default
          metric MetricStr | PaintDeviceMetric

          metric information to get

          required
          Source code in prettyqt/gui/paintdevice.py
          def get_metric(self, metric: MetricStr | QtGui.QPaintDevice.PaintDeviceMetric) -> int:
              """Return metric information.
          
              Args:
                  metric: metric information to get
          
              Returns:
                  metric information
              """
              return self.metric(METRICS.get_enum_value(metric))
          

          :fa-brands-github: Show source on GitHub