Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.7.2
-
None
-
695a39410c8ce186a2ce78cef51093c55fc32643
Description
Run the code below. Note how sourceSize.width is first 49 then changes immediately to zero. Drag the blue rect and note how sourceSize.height is correctly reported as 57. Drag the blue rect up and left past the top corner and note how the sourceSize.width is reported as increasingly negative values and never returns to larger values. If the Row is replaced with a Column then the same effect can be seen on sourceSize.height.
include QtQuick 1.0 Rectangle { width: 800 height: 640 Row { anchors.top: parent.top anchors.left: parent.left anchors.bottom: blueHandle.top anchors.right: blueHandle.left Image { id: iconImage anchors.top: parent.top anchors.bottom: parent.bottom source: "testIcon.png" onHeightChanged: print("sourceSize.height: " + sourceSize.height) onWidthChanged: print("sourceSize.width: " + sourceSize.width) fillMode: Image.PreserveAspectFit smooth: true } } Rectangle { id: blueHandle color: "blue" width: 25 height: 25 MouseArea { anchors.fill: parent drag.target: blueHandle } } }