Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
Qt for MCUs 2.3.1
-
None
-
-
d12c195b138a087444890ccd59c65a07825af5e4, afeef10c82927a65f59bf59f4c5121dfcb68799e
Description
The document(https://doc.qt.io/QtForMCUs-2.3/qtquick-visualcanvas-visualparent.html#stacking-order) says something like this.
Z values below 0 will stack below the parent,
{}However, the code below proves otherwise. In the code, the red rectangle has z as -10, which is smaller than the z value of the green rectangle(parent). If the documentation is true, the red rectangle should be stacked below the parent(green rectangle).
import QtQuick 2.0 Rectangle { color: "#272822" width: 320 height: 480 z:10 Rectangle { y: 64 z: 3 width: 256 height: 256 color: "green" Rectangle { x: 192 y: 64 z: -10 width: 128 height: 128 color: "red" } } Rectangle { x: 64 y: 192 z: 2 width: 256 height: 256 color: "blue" } }
Here is the output. The red rectangle is stacked above the parent(green rectangle).