Details
-
Bug
-
Resolution: Invalid
-
P1: Critical
-
None
-
6.2.1, 6.2.2
-
None
Description
This is a regression introduced when upgrading from Qt 5.15.2 to 6.2.2.
I have my own style for QtQuickControls as described in the docs. I do not need to override all components, so I have a fallback in my qmldir file:
module QtQuick.Controls.MyStyle
Button 6.0 Button.qml
# ...
ScrollBar 6.0 ScrollBar.qml
# Fallback
import QtQuick.Controls.Basic auto
When I use a ScrollView (which I do not override from the Basic style), it does not use my custom-styled ScrollBar but the ScrollBar from the Basic style.
I would expect it to use my custom-styled ScrollBar. This was also the behavior of Qt 5.15.2.
Suggestion for a fix
These are the imports in qtdeclarative/src/quickcontrols2/basic/ScrollView.qml:
import QtQuick import QtQuick.Controls.impl import QtQuick.Templates as T
It currently imports the ScrollBar from QtQuick.Controls.impl, so it does not get styled.
If the imports were to be changed to the following, it would pick up the custom ScrollBar style:
import QtQuick import QtQuick.Controls import QtQuick.Templates as T
Workaround
In the meantime, this can be solved by adding a ScrollView to the custom theme.
Attachments
For Gerrit Dashboard: QTBUG-99367 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
388578,2 | WIP: QTBUG-99367 | dev | qt/qtdeclarative | Status: ABANDONED | -2 | 0 |
388623,2 | Document that custom styles should not import QtQuick.Controls | 6.2 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
388624,2 | Document that custom styles should not import QtQuick.Controls | 6.3 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
388629,2 | Document that custom styles should not import QtQuick.Controls | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
388630,4 | Document that all required types must be implemented by custom styles | dev | qt/qtdeclarative | Status: MERGED | +2 | 0 |
395983,2 | Document that all required types must be implemented by custom styles | 6.2 | qt/qtdeclarative | Status: MERGED | +2 | 0 |
395984,2 | Document that all required types must be implemented by custom styles | 6.3 | qt/qtdeclarative | Status: MERGED | +2 | 0 |