C++ 入門指南 4.01
練習 26.3 參考程式 - 練習 QML 的 Flow
import QtQuick Window { width: 200 height: 200 visible: true title: qsTr("流動元件") Flow { anchors.fill: parent anchors.margins: 4 spacing: 10 Text { text: "T"; font.pixelSize: 40 } Text { text: "h"; font.pixelSize: 40 } Text { text: "e"; font.pixelSize: 40 } Text { text: "r"; font.pixelSize: 40 } Text { text: "e"; font.pixelSize: 40 } Text { text: " "; font.pixelSize: 40 } Text { text: "i"; font.pixelSize: 40 } Text { text: "s"; font.pixelSize: 40 } Text { text: " "; font.pixelSize: 40 } Text { text: "n"; font.pixelSize: 40 } Text { text: "o"; font.pixelSize: 40 } Text { text: " "; font.pixelSize: 40 } Text { text: "s"; font.pixelSize: 40 } Text { text: "p"; font.pixelSize: 40 } Text { text: "o"; font.pixelSize: 40 } Text { text: "o"; font.pixelSize: 40 } Text { text: "n"; font.pixelSize: 40 } Text { text: "."; font.pixelSize: 40 } } } /* 《程式語言教學誌》的範例程式 http://kaiching.org/ 檔名:main.qml 功能:示範 Flow 型態 作者:張凱慶 */