diff --git a/src/widgets/common/customlabel.cpp b/src/widgets/common/customlabel.cpp index 9af89d44dd6e60c84e70bc1d44d73653d56af056..26f912328b6d212189185c30d56d33b4c897bea1 100644 --- a/src/widgets/common/customlabel.cpp +++ b/src/widgets/common/customlabel.cpp @@ -1,16 +1,15 @@ #include "customlabel.h" - #include -CustomLabel::CustomLabel(QWidget *parent, - Qt::WindowFlags f) +CustomLabel::CustomLabel(QWidget *parent, Qt::WindowFlags f) : QLabel(parent, f) { } QPixmap CustomLabel::pixmap() const { - return QLabel::pixmap(Qt::ReturnByValue); + const QPixmap *p = QLabel::pixmap(); + return p ? *p : QPixmap(); } void CustomLabel::setPixmap(const QPixmap &pixmap)