透明与Z序示例

import QtQuick 2.4
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4
import QtQuick.Window 2.2

Window {
    visible: true
    MainForm {
        anchors.fill: parent
        mouseArea.onClicked: {
            Qt.quit();
        }

        Rectangle{
            width:320
            height: 480


            Rectangle{
                x:20
                y:20
                width:150
                height: 100
                color:"#000080"
                z:0.5
            }

            Rectangle{
                x:100
                y:70
                width:100
                height: 100
                color: "#00c000"
                z:1
                opacity: 0.6
            }


        }
    }
}

posted @ 2015-08-27 21:01  yshy  阅读(290)  评论(0编辑  收藏  举报