I'm wondering if there's a way to implement system tray icon + menu functionality without widgets module?
Asked
Active
Viewed 1,811 times
8
-
A quick search: http://doc.qt.io/qt-5/qtwinextras-overview.html#taskbar – derM - not here for BOT dreams Dec 12 '16 at 07:19
-
thanks, but not sure if i understand how it helps here. What i need is something like QSystemTrayIcon but without widgets module dependency. Or/and some ideas about approach on how to implement it optimal way. – mbg033 Dec 12 '16 at 07:32
-
Sorry, mixed *SystemTry* and *TaskBar* – derM - not here for BOT dreams Dec 12 '16 at 07:38
-
You should write `QSystemTrayIcon` wrapper in C++ to use it in QML. There is no way to create system tray icon in pure QML. – folibis Dec 12 '16 at 07:52
1 Answers
11
Qt 5.8 introduces a SystemTrayIcon
QML type in the experimental Qt Labs Platform module, as part of the Qt Quick Controls 2 offering. It uses a native implementation directly from the Qt Platform Abstraction layer where available, and Qt Widgets as a fallback on other platforms.
-
-
1The Windows port of Qt has gained support for native menus in Qt 5.10, which made it also possible to move QSystemTrayIcon's Windows-backend from Qt Widgets to to the Qt Platform Abstraction layer. Thus, starting with Qt 5.10, Qt Labs Platform SystemTrayIcon and Menu no longer requires Qt Widgets on Windows. Furthermore, Qt Labs MenuBar becomes functional on Windows. – jpnurmi May 19 '17 at 17:36