There's a plugin called Qt.labs.platform
. Among other things, it provides tray icon with a menu. That menu has a list of MenuItem
s. Any menu item may have an icon, which would be displayed on the left side of item's text.
There's two ways of setting the icon, none of which work for me:
1) Version 1.0 defined iconSource
and iconName
properties.
Silently does not work, just shows no icon.
2) Revision 1.1 (declared as Q_REVISION(1)
) introduces icon.name
, icon.source
and icon.mask
"sub-properties" (not sure what's the right name for it?)
Fails QML engine with a message:
"MenuItem.icon" is not available in Qt.labs.platform 1.1.
I tried both import Qt.labs.platform 1.1
and 1.0
.
Am I missing something in the mechanics of QML revisions or this is a bug in Qt?
A MenuItem
is declared in qquickplatformmenuitem_p.h and defined in qquickplatformmenuitem.cpp files.
I'm using ArchLinux, KDE/Plasma. Some other apps (like electron-based) do have their icons in menu showing properly.
UPD Reported as a Qt bug.