在 Ubuntu 22.04 上使用 Qt 框架。 UI 由 QSystemTrayIcon 组成,该图标依赖于 App Indicator Gnome Shell 扩展的安装:
$ sudo apt install gnome-shell-extension-appindicator
可以看到QSystemTrayIcon,但安装gnome-shell-extension-appindicator后需要注销/登录。有没有办法让 gnome-shell-extension-appindicator 生效,无需注销并重新登录即可显示 QSystemTrayIcon?
如果您从包管理器安装 AppIndicator 扩展,则必须注销并登录才能加载它。
如果您从extensions.gnome.org安装它(即https://extensions.gnome.org/extension/615/appindicator-support/),那么它应该立即加载。