I'm trying to enable users to click on an action in a QSystemTrayIcon
's contextMenu
multiple times without making it hide, which happens by default.
I tried to show
the contextMenu
when an action is triggered (clicked), so it makes it show up after hiding, but the problem with this is that the contextMenu
will pop up at the top left corner of the screen, because it takes a QPoint(0,0)
I'm guessing, and it does not have the my system's theme as well. Below is what I mean:
normal ContextMenu
:
ContextMenu
that pops up at the top left corner when using show
:
I also tried to emit activated
signal with QSystemTrayIcon::Context
, but that did nothing, although QSystemTrayIcon::Trigger
works perfectly.
I'm using:
- KDE Neon
- X11
- Qt 6.5.0