dqml
dqml copied to clipboard
[enhancement] System tray icon support?
Native QML does not provide support for system tray icons, instead one needs to leverage QT and bind to QML as shown here or here. Would it be possible to get support for this into dqml?
Specifically, the functionality I am after is this: One tray icon with two actions "Show" and "Quit", the former of which shows a specific window (maybe by its QML id?) if it is not yet shown (and focuses it), while the latter quits the QML application. It would also be nice if tray's icon could be loaded from QT's Resource system.
Yes, i've to decide if to put this functionality in the DOtherSide (for simplicity of the implementation) or to put it in a different QML module (better) that a user can use by adding the module in the qml import path.
Cool! Would the latter mean that I would need to load some (C++) shared library that connects to Qt or would this be done completely in QML? Sorry if that should be obvious, but I'm not sure which you mean.
Yes, basically something like QtQuickControls (so a shared library to put in your import path)
import DOtherSide.Extra 1.0
Window {
SystemTrayIcon {
visible: true
menu: Menu { ... }
}
}
Hm, I assume Qt takes care of loading the shared library dynamically (from where ever the module lies)?
yes correct
2015-12-24 12:41 GMT+01:00 Moritz Maxeiner [email protected]:
Hm, I assume Qt takes care of loading the shared library dynamically (from where ever the module lies)?
— Reply to this email directly or view it on GitHub https://github.com/filcuc/dqml/issues/8#issuecomment-167097355.
Filippo Cucchetto