The SystemTrayIcon component provides the ability to add and manipulate a native system tray icon. NodeGui's QSystemTrayIcon.


<script lang="ts">
import { onMount } from "svelte";
import { QIcon, QAction } from "@nodegui/nodegui";
import path from "path";
onMount(() => {
(window as any).win = win; // Prevent garbage collection.;
const icon = new QIcon(path.join(__dirname, "../extras/assets/nodegui.png"));
const action = new QAction();
function onTriggered(){
action.addEventListener("triggered", onTriggered);
return () => {
action.removeEventListener("triggered", onTriggered);
delete (window as any).win;
<window bind:this={win}>
<systemTrayIcon {icon} tooltip="Hello World" visible>
<menu actions={[action]}/>


  • RNProps





Optional icon

icon? : QIcon

Sets an icon for the system tray. QSystemTrayIcon: setIcon

Optional id

id? : undefined | string

Sets the object name (id) of the widget in Qt. Object name can be analogous to id of an element in the web world. Using the objectName of the widget one can reference it in the Qt's stylesheet much like what we do with id in the web world. QWidget: setObjectName

Optional on

on? : Partial‹WidgetEventListeners | QSystemTrayIconSignals›

Prop to set the event listener map. See Handlong Events

Optional tooltip

tooltip? : undefined | string

Sets a tooltip for the system tray. QSystemTrayIcon: setTooltip

Optional visible

visible? : undefined | false | true

Shows or hides the widget and its children. QWidget: show