Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
5.15.12, 6.2.7, 6.4.2, 6.5.0
-
Windows 10 Pro 22H2, MSVC 2019 x64, NVIDIA GeForce GTX 1080Ti with GameReady Driver 528.02
-
650e7d47f (dev), b0e3fe19f (6.5), f11d719ca (6.4), 8fdcbd60e (tqtc/lts-5.15), f6576ccb2 (tqtc/lts-6.2)
Description
import QtQuick 2.15 import QtQuick.Window 2.15 import QtQuick.Controls 2.15 import QtQuick.Shapes 1.15 Window { id: root width: 640 height: 480 visible: true property color displayColor: "yellow" // Should only show at startup ComboBox { model: ["red", "lime", "blue", "transparent"] onActivated: root.displayColor = currentText } Rectangle { anchors.centerIn: parent height: 100 width: 100 color: root.displayColor } Shape { anchors.fill: parent ShapePath { strokeColor: root.displayColor strokeWidth: 4 startX: 0 startY: root.height PathLine { x: root.width; y: 0 } onStrokeColorChanged: console.log("strokeColor:", strokeColor) } } }
Steps to reproduce
- Run the code above
- Select different entries from the ComboBox to change the Rectangle and ShapePath colours
Outcomes
- The Rectangle always follows the selected colour. (Expected)
- The ShapePath mostly follows the selected colour. However, every time we switch from "transparent" to a non-transparent colour, ShapePath becomes yellow instead of the selected colour. (Not expected)
Workarounds
- Instead of "transparent", use an almost-transparent colour such as "#01000000", OR
- Use QQuickWindow::setSceneGraphBackend("software")
Notes
- This issue occurs when hardware acceleration is enabled: both RHI and traditional OpenGL (Qt 5.15)
- This issue occurs on multiple RHI backends (tested on OpenGL, Vulkan, D3D11)