Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.11.3, 5.12.3
-
None
Description
When an item is translated by a high offset its position is not updated correctly,
The following snippet reproduce the problem:
import QtQuick 2.12 import QtQuick.Window 2.12 Window { visible: true width: 640 height: 480 title: qsTr("Hello World") property real offset: 775999618 Item { id: item x: -offset width: parent.width height: parent.height Rectangle { width: 100 height: 100 color: "red" x: offset } } MouseArea { anchors.fill: parent drag.target: item } }
The expected behavior isĀ a smooth dragging of the item (and it's red child rectangle). What happen is that along the X-Axis the inner item is moved with some kind of step. Maybe this could be caused by some kind of error accumulated in the internals of QQuickItem private classes when working with doubles (or maybe a rounding somewhere).
Obviously dragging the item on the Y-Axis doesn't cause any problem because the offset on that axis is 0.
Another thing to note is that the offset is inside the range of int32_t, In other words is not so big and it should not be truncated given that all QtQuick stuff work with qreal (floats).