QPixmapWidget

Inheritance diagram of QPixmapWidget
class QPixmapWidget(parent=None, designMode=False)[source]

Bases: PyQt4.QtGui.QWidget

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.

DefaultAlignment = <PyQt4.QtCore.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: PyQt4.Qt.Alignment

getAspectRatioMode()[source]

Returns the aspect ratio to apply when drawing the pixmap. :return: the current aspect ratio :rtype: PyQt4.Qt.AspectRatioMode

getPixmap()[source]

Returns the pixmap.Returns None if no pixmap is set. :return: the current pixmap :rtype: PyQt4.Qt.QPixmap

classmethod getQtDesignerPluginInfo()[source]
getTransformationMode()[source]

Returns the transformation mode to apply when drawing the pixmap. :return: the current transformation mode :rtype: PyQt4.Qt.TransformationMode

paintEvent(paintEvent)[source]

Overwrite the paintEvent from QWidget to draw the pixmap

pixmap

This property holds the widget’s pixmap

Access functions:

recalculatePixmap()[source]
resetAlignment()[source]

Resets the transformation mode to Qt.Qt.AlignLeft | Qt.Qt.AlignVCenter

resetAspectRatioMode()[source]

Resets the aspect ratio mode to KeepAspectRatio

resetPixmap()[source]

Resets the pixmap for this widget.

resetTransformationMode()[source]

Resets the transformation mode to SmoothTransformation

resizeEvent(event)[source]
setAlignment(alignment)[source]

Sets the alignment to apply when drawing the pixmap. :param pixmap: the new alignment :type pixmap: PyQt4.Qt.Alignment

setAspectRatioMode(aspect)[source]

Sets the aspect ratio mode to apply when drawing the pixmap. :param pixmap: the new aspect ratio mode :type pixmap: PyQt4.Qt.AspectRatioMode

setPixmap(pixmap)[source]

Sets the pixmap for this widget. Setting it to None disables pixmap :param pixmap: the new pixmap :type pixmap: PyQt4.Qt.QPixmap

setTransformationMode(transformation)[source]

Sets the transformation mode to apply when drawing the pixmap. :param pixmap: the new transformation mode :type pixmap: PyQt4.Qt.TransformationMode

transformationMode

This property holds the widget’s pixmap transformation mode

Access functions: