View Full Version : Problem with QDesktopWidget::availableGeometry when building an app bar

5th July 2011, 12:56
On windows I allow my app to be run as an appbar/sidebar but unfortunately QDesktopWidget::availableGeometry does not return the space actually occupied by my app; this results in all popup menus appearing beside my application instead of where they should be.

For standard popup menus I have solved this problem by using an event filter on show and repositioning them manually but this solution doesn't work for QCompleter, every time you call QCompleter::complete the popup position is recalculated based on the QDesktopWidget::availableGeometry and if you reposition the completer popup after the call to complete you can see it blink briefly in the bad position.

Is there any way I can register the space my application is taking with QDesktopWidget::availableGeometry or how can I reposition QCompleter:: popup() without causing it to blink...