
C++ 入門指南 4.01
練習 26.1 參考程式 - 練習 QML 的 Rectangle
import QtQuick Window { width: 320 height: 200 visible: true title: qsTr("長方形元件") Rectangle { color: "red" width: 80 height: 100 x: 20 y: 30 } Rectangle { color: "blue" width: 80 height: 80 x: 2 y: 100 } Rectangle { color: "green" width: 200 height: 30 x: 100 y: 40 } Rectangle { color: "yellow" width: 180 height: 80 x: 80 y: 70 } } /* 《程式語言教學誌》的範例程式 http://kaiching.org/ 檔名:main.qml 功能:示範 Rectangle 型態 作者:張凱慶 */
