Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.14.2
-
None
Description
If the policy of a ScrollBar is set to Qt.ScrollBarAsNeeded, when it is not needed, it steals mouse events. A workaround can be toggling the policy between Qt.ScrollBarAlwaysOff and Qt.ScrollBarAlwaysOn appropriately, but if we do that, what's the purpose of having a Qt.ScrollBarAsNeeded policy?
An example is provided. In this case a ListView with 10 delegates. When you make the Window big enough so the scroll bar is not needed, you can see that clicking in the rightmost side of any delegates is useless. You may think "why should you click there?", and a possible answer can be just because you wanted to do so, however with complex UIs or custom (bigger) scroll bars you may end loosing very valuable space.
Note: It is not actually related to this bug, but there's another bug here. In the Material style, if you press a delegate you will see the Material ripple, but do it again without removing the mouse outside the button and you will not see it, despite the button was clicked and clicked() signal is emitted, giving the feeling that the button was not clicked the second time.
The example can be executed with qmlscene.
Example code:
ScrollBarStealsMouseEvents.qml
Attachments
Issue Links
- is duplicated by
-
QTBUG-90349 ScrollView catches clicks on invisible scrollbars
-
- Closed
-