redai/imagelabel.h

20 lines
367 B
C
Raw Normal View History

2023-03-27 12:49:53 -04:00
#pragma once
#include <QLabel>
class ImageLabel : public QLabel {
Q_OBJECT
public:
explicit ImageLabel(QWidget *parent = nullptr);
int heightForWidth(int width) const override;
QSize sizeHint() const override;
QPixmap scaledPixmap() const;
public slots:
void setPixmap(const QPixmap &);
void resizeEvent(QResizeEvent *) override;
private:
QPixmap pix;
};