Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
None
-
5.15.12, 6.5.0 Beta1
-
-
db8f3607e (dev), 4e535be5c (6.5), daca3c6d8 (tqtc/lts-6.2)
Description
After the fix for https://bugreports.qt.io/browse/QTBUG-104983
https://codereview.qt-project.org/c/qt/qtdeclarative/+/422252
There is still a problem:
If a scrollview contentitem is assigned afterwards, as opposed as declared in,
QQuickControlPrivate::unhideOldItem will be called unconditionally, disregarding current bindings between scrollbar policy and visiblity that may be declared in the controls style.
so for instance if a scrollbar had a policy of AlwaysOff, it will be shown anyways.
The attached minimal example will show a listview with the horizontal scrollbar shown even if has an alwaysoff policy
import QtQuick import QtQuick.Controls ApplicationWindow { width: 640 height: 480 visible: true ListView { id: otherView clip: true model: 100 delegate: Text { text: modelData } } Component.onCompleted: cardsView.contentItem = otherView ScrollView { id: cardsView width: 200 height: 200 background: Rectangle { color: "transparent" border.width: 1 } ScrollBar.horizontal.policy: ScrollBar.AlwaysOff } }
Attachments
Issue Links
- relates to
-
QTBUG-106106 Crash in ~QQuickScrollBarAttached during rearrange of QQmlDelegateModel
- Closed
- resulted from
-
QTBUG-104983 [REG] 908aa77d16e00f2bccc0ddae0f8b61955c56a6a1 breaks scrollbars if contentItem is accessed before it is set
- Closed