Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
5.15.14, 6.2.8, 6.5.1
-
Raspberry Pi 4 Model B, official Boot2Qt QBSP image, OR Windows 10 22H2 with software renderer
-
29a52df82 (dev), 57cdb43db (6.8), c996d0fa2 (6.7), 43bb92c45 (tqtc/lts-6.5), 7128a2e05 (tqtc/lts-6.2), b870d5cbe (tqtc/lts-5.15)
Description
Code
// main.qml import QtQuick 2.15 import QtQuick.Controls 2.15 import QtQuick.Layouts 1.15 import QtQuick.Shapes 1.15 ApplicationWindow { id: root width: 640 height: 480 visible: true color: "black" property bool antialias: true // WORKAROUND: Make this `false` property int val: 0 Item { id: gui anchors.fill: parent Column { anchors.fill: parent padding: 10 spacing: 10 Row { padding: 10 spacing: 10 Repeater { model: 10 Shape { // This is a simplified version of SvgPathItem from Qt Design Studio: // https://code.qt.io/cgit/qt-labs/qtquickdesigner-components.git/tree/src/imports/components/SvgPathItem.qml?h=qds-4.2 id: shape width: 50 height: 50 antialiasing: root.antialias layer.enabled: root.antialias layer.smooth: root.antialias layer.samples: root.antialias ? 4 : 0 ShapePath { strokeWidth: 0 strokeColor: "transparent" fillColor: root.val > index ? "lime" : "grey" PathSvg { path: "M 0 0 H 50 V 50 H 0 Z" } } } } } Text { text: `${root.val*10} %` color: "white" } Button { text: "Reset" onClicked: { gui.visible = false // WORKAROUND: Comment out this line. Avoid changing values/colors while invisible root.val = 0 } } } } Timer { // Animate the progress bar interval: 200 running: true repeat: true onTriggered: { ++root.val if (root.val > 10) root.val = 0 } } Timer { // Un-hide the progress bar after a short delay interval: 100 running: !gui.visible repeat: true onTriggered: gui.visible = true } }
Steps to Reproduce
- Build and run the attached project
- Observe the progress bar from 0% to 100% a few times
- Click the "Reset" button when the bar is around 50%
- Observe the progress bar from 0% to 100% a few times
Expected behaviour
The progress bar visually matches the percentage number on screen at all times.
Actual behaviour
When using the linuxfb platform plugin, the progress bar is visually frozen for a short while at Step #4. The behaviour returns to normal after the progress value reaches 50% (or whatever the value was when Step #3 was done).
Non-linuxfb plugins are not affected. EDIT: ** No need for linuxfb – the softwarer renderer has the same issue
Possible workarounds
- This issue does not occur if antialiasing is disabled (possibly related to multisample AA?)
- This issue does not occur if we avoid updating any properties that result in visual changes while the Shape is invisible.