Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

Z-order in dynamically created object

$
0
0
I want to the red rectangle has higher Z value than blue one, but it does not seems it’s working between two objects in different files. main.qml import QtQuick 2.2 import QtQuick.Controls 1.1   ApplicationWindow {     id: root     visible: true     width: 640     height: 480         Rectangle {         color: "red"         height: 100         width: 100         z: 1           Component.onCompleted: {             var component = Qt.createComponent("rect.qml")             var object = component.createObject(root)         }     } } rect.qml import QtQuick 2.0   Rectangle {     y: 50     width: 100     height: 100     color: "blue"     z: 0 } Thank you

Viewing all articles
Browse latest Browse all 4972

Trending Articles