QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
|
The QgsPixmapLabel class shows a pixmap and adjusts its size to the space given to the widget by the layout and keeping its aspect ratio. More...
#include <qgspixmaplabel.h>
Public Slots | |
void | clear () |
Clears any label contents. More... | |
void | resizeEvent (QResizeEvent *) override |
void | setPixmap (const QPixmap &) |
Public Member Functions | |
QgsPixmapLabel (QWidget *parent=nullptr) | |
Constructor for QgsPixmapLabel. More... | |
int | heightForWidth (int width) const override |
Calculates the height for the given width. More... | |
QSize | sizeHint () const override |
An optimal size for the widget. More... | |
The QgsPixmapLabel class shows a pixmap and adjusts its size to the space given to the widget by the layout and keeping its aspect ratio.
Definition at line 28 of file qgspixmaplabel.h.
|
explicit |
Constructor for QgsPixmapLabel.
Definition at line 19 of file qgspixmaplabel.cpp.
|
slot |
Clears any label contents.
Definition at line 69 of file qgspixmaplabel.cpp.
|
override |
Calculates the height for the given width.
width | The width for the widget |
Definition at line 42 of file qgspixmaplabel.cpp.
|
overrideslot |
Definition at line 59 of file qgspixmaplabel.cpp.
|
slot |
Definition at line 24 of file qgspixmaplabel.cpp.
|
override |
An optimal size for the widget.
Effectively using the height determined from the width with the given aspect ratio.
Definition at line 50 of file qgspixmaplabel.cpp.