summaryrefslogtreecommitdiffstats
path: root/src/widgets/doc/snippets/code
diff options
context:
space:
mode:
authorGabriel de Dietrich <gabriel.dedietrich@qt.io>2017-05-01 11:43:05 +0700
committerGabriel de Dietrich <gabriel.dedietrich@qt.io>2017-05-04 06:43:52 +0000
commit35f927e719eb50b90dcfc76ca63c72a38ef821d7 (patch)
tree2883c56e6efbbcf7c4a62831cd6bf10e33c036c0 /src/widgets/doc/snippets/code
parent98c1d516b7f7624f7fcd7b9046783e3903a6a42b (diff)
QMenu: Ensure popup() gets the right screen geometry
Many QMenu related functions end up calling sizeHint() which does call updateActionRects(). Since we try not to update the action rects if no action has changed, we must be careful to call it the first time with the right screen geometry. Other- wise, multi-display setups may get the action rects based on the wrong display. In QMenu::popup(), this can be solved by using the position passed as argument. Incidentally, we were already computing the right display geometry in the same function, only a bit later. The updated position around an eventual push button menu should not change the screen onto which the menu popup will be displayed. Tested with the multiscreen-menus manual test. Change-Id: Id7fc24be6908b4a9d24b8b9c8b8006efe45d69be Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/widgets/doc/snippets/code')
0 files changed, 0 insertions, 0 deletions