edifice.Image#
- class edifice.Image(src, aspect_ratio_mode=None, **kwargs)[source]#
Bases:
QtWidgetElementRender an image.
Underlying Qt Widget QLabel
Props
All props from
QtWidgetElement, plus:- Parameters:
src (
str|QImage|QPixmap) –One of:
aspect_ratio_mode (
Optional[AspectRatioMode]) –The aspect ratio mode of the image.
Nonefor a fixed image which doesn’t scale.An AspectRatioMode to specify how the image should scale.
Usage
To render a 3-dimensional
uint8numpyarray as an image, seeedifice.extra.numpy_image.NumpyImage.Methods
__init__(src[, aspect_ratio_mode])register_ref(reference)Registers provided
Referenceto this Element.set_key(key)Set the key of an
Element.Attributes
childrenThe children of this Element.
propsThe props of this Element.
underlyingThe underlying QWidget, which may not exist if this Element has not rendered.