Solved Position popup window on bottom-right above taskbar?
-
Is there a convenience method to position a top-level window on bottom-right of the desktop, just above taskbar - as is common on windows platform with notification windows?
I tried using frameGeometry() to get current window size (including frame), however, it returns incorrect size Until the window is shown. If I move the window after calling show(), then there is flicker on the screen, which doesn't look good.
-
Before window is shown there is no window or frame so there is no (valid) frame size. To mitigate the flicker you can replace
show
withshowMinimized
, then adjust window's geometry and then callshow
orsetWindowState
to actually show it. Another option is tomove
the window to some out of view coordinates before showing it (eg. take screen geometry and add some), then show it, take the frame geometry and use it to move the window where you want it. -
Before window is shown there is no window or frame so there is no (valid) frame size. To mitigate the flicker you can replace
show
withshowMinimized
, then adjust window's geometry and then callshow
orsetWindowState
to actually show it. Another option is tomove
the window to some out of view coordinates before showing it (eg. take screen geometry and add some), then show it, take the frame geometry and use it to move the window where you want it. -
Yes, seems like these are the only two options.