Skip to content

QSystemTrayIcon

QSystemTrayIcon is a widget that provides a system tray icon for your application.

Example

example_systemTrayIcon.ts
import { QSystemTrayIcon, QIcon } from '@vixen-js/core';
import { resolve } from 'path';
const icon = new QIcon(
resolve('./assets/icon.png')
);
const sysTray = new QSystemTrayIcon();
sysTray.setIcon(icon);
sysTray.show();
// To prevent the icon from being garbage collected
(global as any).tray = sysTray;

Learn more about QSystemTrayIcon in: https://doc.qt.io/qt-6/qsystemtrayicon.html