QPixmapWidget
- class QPixmapWidget(parent=None, designMode=False)[source]
This widget displays an image (pixmap). By default the pixmap is scaled to the widget size and the aspect ratio is kept. The default alignment of the pixmap inside the widget space is horizontal left, vertical center.
Import from
taurus.qt.qtgui.display
as:from taurus.qt.qtgui.display import QPixmapWidget
- DefaultAlignment = <PyQt5.QtCore.Qt.Alignment object>
- DefaultAspectRatioMode = 1
- DefaultTransformationMode = 1
- alignment
This property holds the widget’s pixmap alignment
Access functions:
- aspectRatioMode
This property holds the widget’s pixmap aspect ratio mode
Access functions:
- getAlignment()[source]
Returns the alignment to apply when drawing the pixmap. :return: the current alignment :rtype: PyQt5.Qt.Alignment
- getAspectRatioMode()[source]
Returns the aspect ratio to apply when drawing the pixmap. :return: the current aspect ratio :rtype: PyQt5.Qt.AspectRatioMode
- getPixmap()[source]
Returns the pixmap.Returns None if no pixmap is set. :return: the current pixmap :rtype: PyQt5.Qt.QPixmap
- getTransformationMode()[source]
Returns the transformation mode to apply when drawing the pixmap. :return: the current transformation mode :rtype: PyQt5.Qt.TransformationMode
- pixmap
This property holds the widget’s pixmap
Access functions:
QPixmapWidget.resetLedStatus()
- setAlignment(alignment)[source]
Sets the alignment to apply when drawing the pixmap.
- Parameters:
pixmap (PyQt5.Qt.Alignment) – the new alignment
- setAspectRatioMode(aspect)[source]
Sets the aspect ratio mode to apply when drawing the pixmap.
- Parameters:
pixmap (PyQt5.Qt.AspectRatioMode) – the new aspect ratio mode
- setPixmap(pixmap)[source]
Sets the pixmap for this widget. Setting it to None disables pixmap
- Parameters:
pixmap (PyQt5.Qt.QPixmap) – the new pixmap
- setTransformationMode(transformation)[source]
Sets the transformation mode to apply when drawing the pixmap.
- Parameters:
pixmap (PyQt5.Qt.TransformationMode) – the new transformation mode
- transformationMode
This property holds the widget’s pixmap transformation mode
Access functions: