Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
None
-
6.3.0, 6.3.1, 6.3.2, 6.4.0, 6.4.2
-
-
901a8bf76 (dev), 17ecdb3f3 (6.5), 3267be5b0 (6.6), a6a8a094c (qds/dev)
Description
Working from QDS, there is a qml file in HelperWidgets named VerticallScrollBar.qml. It extends the QtQuickControls / Native ScrollBar.
I get the following error on application output when I hover in the app over the scroll bar:
qrc:/qt-project.org/imports/QtQuick/Controls/Windows/ScrollBar.qml:69:49: Unable to assign [undefined] to int
which appears to refer to the following line inside quickcontrols2/windows/ScrollBar.qml:
visible: contentItem instanceof NativeStyle.StyleItem Behavior on opacity { NumberAnimation { duration: contentItem.transitionDuration } } // <---------- this line
The contentItem doesn't have the "transitionDuration" property, and that is because the contentItem is a Rectangle, rather than a NativeStyle.StyleItem. And that's because VerticalScrollBar.qml above has the contentItem redefined like this:
contentItem: Rectangle { implicitWidth: StudioTheme.Values.scrollBarThickness color: StudioTheme.Values.themeScrollBarHandle }
This is something that the Qt Quick ScrollBar should have supported (given the "contentItem instanceof NativeStyle.StyleItem" above), but somehow it seems that this animation is being called, and this NativeStyle.ScrollBar object ends up being visible, although the contentItem is redefined as a Rectangle.
Example project attached.
When hovering scrollbar with mouse, you get output
"qrc:/qt-project.org/imports/QtQuick/Controls/Windows/ScrollBar.qml:69:49: Unable to assign [undefined] to int"
Attachments
Issue Links
- relates to
-
QTBUG-96733 Prevent users from customising native styles
- Reported
For Gerrit Dashboard: QTBUG-107771 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
472813,3 | HelperWidgets: Explicitly import Basic style | qds/dev | qt-creator/qt-creator | Status: MERGED | +2 | 0 |
472821,5 | Windows native style: Mark ScrollBar as non-customizable | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
490605,2 | Windows native style: Mark ScrollBar as non-customizable | 6.6 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
490606,2 | Windows native style: Mark ScrollBar as non-customizable | 6.5 | qt/qtdeclarative | Status: MERGED | +2 | 0 |