5#include <Kanoop/gui/libkanoopgui.h>
31 explicit IconLabel(
const QString& text, QWidget *parent =
nullptr);
39 explicit IconLabel(
const QString& text,
const QIcon& icon, QWidget *parent =
nullptr);
72 void createLayout(
const QString& text,
const QIcon& icon);
74 QLabel* _label =
nullptr;
75 QLabel* _iconLabel =
nullptr;
Composite widget showing a text label alongside an icon.
void setIcon(const QIcon &icon)
Set the icon.
IconLabel(const QString &text, const QIcon &icon, QWidget *parent=nullptr)
Construct with text and an icon.
void setIconAlignment(Qt::Alignment alignment)
Set the alignment of the icon within the layout.
IconLabel(const QString &text, QWidget *parent=nullptr)
Construct with text only.
IconLabel(QWidget *parent=nullptr)
Construct an empty IconLabel.
QIcon icon() const
Return the current icon.
void setText(const QString &text)
Set the label text.
QString text() const
Return the current label text.