version 1.5.0

IconedLabel now remove spacings in case of empty text or icon
This commit is contained in:
2020-06-23 19:57:16 +03:00
parent 3acec2297b
commit 50efa51975
3 changed files with 41 additions and 4 deletions

View File

@@ -38,13 +38,16 @@ public:
explicit IconedLabel(QWidget * parent = 0);
QString text() const {return label_.text();}
QString text() const;
QIcon icon() const;
QSize iconSize() const {return size_;}
Direction direction() const {return dir_;}
QLabel * textLabel() {return &label_;}
protected:
virtual bool event(QEvent * e);
void checkSpacing();
QSize realIconSize() const;
QLabel label_, icon_;
@@ -53,7 +56,7 @@ protected:
Direction dir_;
public slots:
void setText(const QString & t) {label_.setText(t);}
void setText(const QString & t);
void setIcon(const QIcon & i);
void setIconSize(const QSize & s);
void setDirection(Direction d);