8393922e70
If the style changes while a popup is open (or about to close), the popup will change style as well before it's hidden. And this can result in the popup window briefly ending up smaller than what it needs to be, in order to fit all the menu items. In that case, it will show 'up' and 'down' widgets in the menu that auto scrolls it when hovered. And all this can happen for a split second while the menu is about to close (as a result of the user clicking on a menu item). A bug happens because of this if you click on the last menu item in the list, and this causes the style to change. In that case, the 'down' widget will end up directly underneath the mouse for a split second, which will trigger an auto-scroll timer to start. This timer will trigger a bit later, after the popup has been hidden, and scroll the list view a bit down. The result is that the next time you open the popup, it ends up at the wrong place on the screen in a failed attempt to center the current index on top of the combobox. This patch will make sure that we always scroll the list view to the top before we start calculating where the popup should be placed on the screen. Otherwise the geometry ends up wrong since the popup will anyway be resized (if possible) to fit all the menu items before it's shown and should therefore not take scrolling into account. Pick-to: 6.6 6.5 Fixes: QTBUG-113765 Change-Id: I61b5b832904de471c2303fc67325feec322b1449 Reviewed-by: Axel Spoerl <axel.spoerl@qt.io> |
||
---|---|---|
.. | ||
dialogs | ||
effects | ||
graphicsview | ||
itemviews | ||
kernel | ||
styles | ||
util | ||
widgets | ||
CMakeLists.txt |