Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.15.0
-
macOS, metal/opengl
Description
The SplitView's width distribution does not round the item's calculated widths to integers.
As usual when using fractional coordinates for positioning items this can cause all kinds of painting artefacts due to rounding errors (jagged lines, jittering text positioning etc.) that do not occur when using integer coordinates.
"jitter" demonstration: Please watch the "A" in the white rectangle when resizing.
import QtQuick 2.15 import QtQuick.Window 2.15 import QtQuick.Controls 2.15 Window { visible: true width: 640 height: 480 title: qsTr("Hello World") SplitView { anchors.fill: parent Rectangle { SplitView.preferredWidth: 200 color: "yellow" Text { anchors.centerIn: parent text: parent.x } } Rectangle { SplitView.preferredWidth: 200 SplitView.fillWidth: true color: "lightsteelblue" // example for "text jitter" Rectangle { width: t.width height: 100 Text { id: t text: "A" anchors.centerIn: parent } } Text { anchors.centerIn: parent text: parent.x } } } }
Either rounding the widths by default or adding a rounding property to SplitView would be splendid.