Qt 練習 (I)

虛擬的不知道是什麼東西的東西.... 哈



import QtQuick 2.3
import QtQuick.Window 2.2

Window {
    visible: true
    width: 560
    height: 560

    MouseArea {
        anchors.rightMargin: 0
        anchors.bottomMargin: 7
        anchors.leftMargin: 1
        anchors.topMargin: -7
        anchors.fill: parent
        onClicked: {
            Qt.quit();
        }
    }

    Text {
        text: qsTr("My Virtual Foo System")
        font.family: "Ubuntu"
        font.pixelSize: 28
        anchors.horizontalCenter: parent.horizontalCenter
        anchors.top: parent.top
        anchors.topMargin: 14
    }

    Rectangle {
        id: cLayer
        x: (parent.width - this.width) / 2
        y: (parent.height - this.height) / 2
        width: (parent.width * 0.8)
        height: parent.height/2
        color: "lightsteelblue"

        Rectangle {
            id: c1
            x:10
            y:10
            width: parent.width/5
            height: (parent.height/2) - 20
            color: "steelblue"
        }
    }
}

simen

An enthusiastic engineer with a passion for learning. After completing my academic journey, I worked as an engineer in Hsinchu Science Park. Later, I ventured into academia to teach at a university. However, I have now returned to the industry as an engineer, again.

Post a Comment (0)
Previous Post Next Post