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