2 qq594987822 qq594987822 于 2015.06.03 16:21 提问

qml-的-Rectangle的窗口显示不出来
Rectangle{
    id: saving;
    width: 470;
    height: 50;
    radius: 5
    anchors.left: parent.left

// x: 0;
// y: -217
z: 5;
visible: false
color: "lightgrey"
MouseArea{
anchors.fill: parent.fill;
}
Text{
anchors.horizontalCenter: parent.horizontalCenter;
anchors.verticalCenter: parent.verticalCenter;
text: qsTr("saving image ...");
color: "white"
font.pixelSize: 30;
}
}

Rectangle{
    id: photo_save_rect;

    width: 86;
    height: 36
    anchors.bottom: parent.bottom;
    radius: 5;
    color: "transparent"
    BorderImage{
        id: photo_save_rect_image;
        anchors.fill: parent;
        source:  "./res/setting_image/down.png"
    }
    MouseArea{
        anchors.fill: parent;
        onPressed: {
            console.log( "onPressed");
            photo_save_rect_image.source = "./res/setting_image/down_pressed.png";
        }
        onReleased: {
            saving.visible = true;
            for( i = 0; i < 5000; i ++ ){
                for( j = 0; j < 2500; j ++ ){
                }
            }
            saving.visible = false;
            photo_save_rect_image.source = "./res/setting_image/down.png"
        }
    }
}
Csdn user default icon
上传中...
上传图片
插入图片