diff options
Diffstat (limited to 'examples/widgets/desktop/systray/main.cpp')
-rw-r--r-- | examples/widgets/desktop/systray/main.cpp | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/examples/widgets/desktop/systray/main.cpp b/examples/widgets/desktop/systray/main.cpp index bb81bb78e4..ece04524b8 100644 --- a/examples/widgets/desktop/systray/main.cpp +++ b/examples/widgets/desktop/systray/main.cpp @@ -39,8 +39,10 @@ ****************************************************************************/ #include <QApplication> -#include <QMessageBox> +#ifndef QT_NO_SYSTEMTRAYICON + +#include <QMessageBox> #include "window.h" int main(int argc, char *argv[]) @@ -61,3 +63,24 @@ int main(int argc, char *argv[]) window.show(); return app.exec(); } + +#else + +#include <QLabel> +#include <QDebug> + +int main(int argc, char *argv[]) +{ + QApplication app(argc, argv); + QString text("QSystemTrayIcon is not supported on this platform"); + + QLabel *label = new QLabel(text); + label->setWordWrap(true); + + label->show(); + qDebug() << text; + + app.exec(); +} + +#endif |