summaryrefslogtreecommitdiffstats
path: root/examples/widgets/desktop/systray/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/widgets/desktop/systray/main.cpp')
-rw-r--r--examples/widgets/desktop/systray/main.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/widgets/desktop/systray/main.cpp b/examples/widgets/desktop/systray/main.cpp
index 49b0e10412..2d91e4ac36 100644
--- a/examples/widgets/desktop/systray/main.cpp
+++ b/examples/widgets/desktop/systray/main.cpp
@@ -59,10 +59,12 @@ int main(int argc, char *argv[])
{
Q_INIT_RESOURCE(systray);
+ QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
+
QApplication app(argc, argv);
if (!QSystemTrayIcon::isSystemTrayAvailable()) {
- QMessageBox::critical(0, QObject::tr("Systray"),
+ QMessageBox::critical(nullptr, QObject::tr("Systray"),
QObject::tr("I couldn't detect any system tray "
"on this system."));
return 1;