[Gambas-bugtracker] Bug #2126: Systray on QT5 does not refresh

bugtracker at gambaswiki.org bugtracker at gambaswiki.org
Tue Mar 16 15:26:40 CET 2021


http://gambaswiki.org/bugtracker/edit?object=BUG.2126&from=L21haW4-

Comment #10 by Benoît MINISINI:

> I'm working on a replacement system panel, the stereotypical developer's itch.  I've attached a screenshot.
> There are accompanying apps like a program menu, weather, and calendar.  It's desktop independent but has only been tested under xfce.
> What do you mean by top-level window? 

I mean... a top-level window. A form if you prefer.

> Must it be your main form? 

Not necessarily.

> Can it be a visible control?  A container?

The systray needs a X11 parent window. Alas only a top-level window is guaranteed to have one whatever the underlying GUI toolkit. So it's simpler to always use a op-level window, and the new X11Systray.Move() method to position your systray inside your top-level window.

> Is the systray affected by the form's automatic arrangement or must it be handled manually?

The systray must be moved and resize manually with X11Systray.Move().
The systray icons must be moved and resized manually as before during the X11Systray_Arrange() method.

> Do you have any sample/test code?

I will see if I can make one for you.

But I have to tell you that X11 systray is deprecated, will may be removed sooner than later, and that you should really make a DBus system tray instead,
following these specifications :

https://www.freedesktop.org/wiki/Specifications/StatusNotifierItem/




More information about the Bugtracker mailing list