Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.15.5, 6.4.0 Beta2, Some future release
-
None
-
58bae53237 (qt/qtdeclarative/dev) 58bae53237 (qt/tqtc-qtdeclarative/dev) 0e511dd67a (qt/qtdeclarative/6.3) d429f31730 (qt/qtdeclarative/6.4) 0e511dd67a (qt/tqtc-qtdeclarative/6.3) d429f31730 (qt/tqtc-qtdeclarative/6.4)
Description
If the contentItem of the ScrollView is not declared as a child of the ScrollView and some binding contains contentItem then no Scrollbars will be shown.
This is because when the binding is evaluated and the contentItem is not set yet, QQuickScrollViewPrivate::ensureFlickable will create and set a flickable. When the actual contentItem is assigned QQuickScrollBarAttachedPrivate::cleanupVertical(Horizontal) will be called which hides the scrollbars and unsets its parent (in hideOldItem).
As far as I could see this is not undone in initVertical or initHorizontal.
This is problematic for us since our custom style contains a binding that references contentItem.
Reverting 908aa77d16e00f2bccc0ddae0f8b61955c56a6a1 fixes it.
I've attached a file to show the issue with the Basic style.
Attachments
Issue Links
- resulted in
-
QTBUG-106118 Changing contentItem to ScrollView breaks scrollbar visibility
- Closed
For Gerrit Dashboard: QTBUG-104983 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
422252,3 | Fix scroll bars not showing up when binding to standalone contentItem | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
427155,2 | Fix scroll bars not showing up when binding to standalone contentItem | 6.4 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
427156,2 | Fix scroll bars not showing up when binding to standalone contentItem | 6.3 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
427157,6 | Fix scroll bars not showing up when binding to standalone contentItem | tqtc/lts-6.2 | qt/tqtc-qtdeclarative | Status: MERGED | +2 | 0 |
427609,2 | Fix scroll bars not showing up when binding to standalone contentItem | tqtc/lts-5.15 | qt/tqtc-qtquickcontrols2 | Status: MERGED | +2 | 0 |