Fix example in documentation (#447)

This commit is contained in:
nilchu 2020-03-16 11:12:54 +01:00 committed by GitHub
parent dda2debf36
commit c57a6048cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -22,6 +22,7 @@ const trayIcon = new QIcon(
resolve(__dirname, "some/image/file.png");
);
const tray = new QSystemTrayIcon();
tray.setIcon(trayIcon);
tray.show();
global.tray = tray; // prevents garbage collection of tray

View File

@ -18,6 +18,7 @@ const trayIcon = new QIcon(
resolve(__dirname, "some/image/file.png");
);
const tray = new QSystemTrayIcon();
tray.setIcon(trayIcon);
tray.show();
global.tray = tray; // prevents garbage collection of tray