C++ 入門指南 4.01
練習 26.6 參考程式 - 練習 QML 的 Column 及 Row
import QtQuick
import QtQuick.Controls
Window {
width: 400
height: 400
visible: true
title: qsTr("格子測試1")
Column {
width: 400
height: 400
Row {
width: 400
height: 200
Button {
width: 200
height: 200
text: qsTr("按鈕1")
}
Button {
width: 200
height: 200
text: qsTr("按鈕2")
}
}
Row {
width: 400
height: 200
Button {
width: 200
height: 200
text: qsTr("按鈕3")
}
Button {
width: 200
height: 200
text: qsTr("按鈕4")
}
}
}
}
/* 《程式語言教學誌》的範例程式
http://kaiching.org/
檔名:main.qml
功能:示範 Cloumn 與 Row 的格子編排方式
作者:張凱慶 */
回到練習題目