AspectRatioLabel Class
class QInstaller::AspectRatioLabelThe AspectRatioLabel class provides a label for displaying a pixmap that maintains its original aspect ratio when resized. More...
Header: | #include <AspectRatioLabel> |
Public Functions
AspectRatioLabel(QWidget *parent = nullptr) |
Reimplemented Public Functions
virtual int | heightForWidth(int w) const override |
virtual QSize | sizeHint() const override |
Public Slots
virtual void | resizeEvent(QResizeEvent *event) override |
void | setPixmap(const QPixmap &pixmap) |
Detailed Description
Member Function Documentation
AspectRatioLabel::AspectRatioLabel(QWidget *parent = nullptr)
Constructs the label with parent as parent.
[override virtual slot]
void AspectRatioLabel::resizeEvent(QResizeEvent *event)
[slot]
void AspectRatioLabel::setPixmap(const QPixmap &pixmap)
Sets the pixmap shown on the label. Setting a new pixmap clears the previous content.