diff options
author | Stephan Binner <stephan.binner@basyskom.com> | 2017-03-05 18:54:15 +0100 |
---|---|---|
committer | Stephan Binner <stephan.binner@basyskom.com> | 2017-03-06 20:35:07 +0000 |
commit | 00e6863552ab3519e8a9a9ecb6cb56bb6a024041 (patch) | |
tree | dc58c861c44ee7d1822921c63b342f3c254c4e10 /src/widgets/util | |
parent | 0884e424106962785b8f2e6742d3590fb3919a97 (diff) |
Add feature.pushbutton
Change-Id: I654d91635e60b177df16f6dfe00acc940132f66a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/widgets/util')
-rw-r--r-- | src/widgets/util/qsystemtrayicon.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/widgets/util/qsystemtrayicon.cpp b/src/widgets/util/qsystemtrayicon.cpp index 4ea776d0b1..1e0d2ab857 100644 --- a/src/widgets/util/qsystemtrayicon.cpp +++ b/src/widgets/util/qsystemtrayicon.cpp @@ -50,7 +50,9 @@ #include "qlabel.h" #include "private/qlabel_p.h" #endif +#if QT_CONFIG(pushbutton) #include "qpushbutton.h" +#endif #include "qpainterpath.h" #include "qpainter.h" #include "qstyle.h" @@ -496,12 +498,14 @@ QBalloonTip::QBalloonTip(const QIcon &icon, const QString &title, const int iconSize = 18; const int closeButtonSize = 15; +#if QT_CONFIG(pushbutton) QPushButton *closeButton = new QPushButton; closeButton->setIcon(style()->standardIcon(QStyle::SP_TitleBarCloseButton)); closeButton->setIconSize(QSize(closeButtonSize, closeButtonSize)); closeButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); closeButton->setFixedSize(closeButtonSize, closeButtonSize); QObject::connect(closeButton, SIGNAL(clicked()), this, SLOT(close())); +#endif #if QT_CONFIG(label) QLabel *msgLabel = new QLabel; @@ -542,7 +546,10 @@ QBalloonTip::QBalloonTip(const QIcon &icon, const QString &title, } #endif +#if QT_CONFIG(pushbutton) layout->addWidget(closeButton, 0, 2); +#endif + #if QT_CONFIG(label) layout->addWidget(msgLabel, 1, 0, 1, 3); #endif |