Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

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.


  • Moderators

    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 with showMinimized, then adjust window's geometry and then call show or setWindowState to actually show it. Another option is to move 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.


  • Moderators

    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 with showMinimized, then adjust window's geometry and then call show or setWindowState to actually show it. Another option is to move 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.


Log in to reply