-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
4.7.3, 4.8.5
-
None
When a button's menu is shown a second time in a QGraphicsScene then it can end up being cut off if it is placed to the right/bottom of the QGraphicsScene. The first time it is shown correctly, but the subseqent times it is not.
With the attached patch to the boxes demo, double click on the "dialog" on the graphicsscene to flip it round and then move it to the bottom right. By clicking on the bottom button it will show a menu, the first time it pops up it is fine, the second it is shifted to the right.
The reason this occurs is because in qmenu.cpp, when it is checking where the menu should be it decides the second time that it does not need to be adjusted for the desktop because once the menu is embedded in the QGraphicsScene it sets the attribute - DontShowOnScreen. This causes it not to be adjusted the second time around and therefore it is not placed correctly.