C++ 入門指南 4.01
練習 29.10 參考程式 - 練習設計文字工具外觀
import QtQuick
import QtQuick.Controls
ApplicationWindow {
width: 600
height: 220
visible: true
title: qsTr("文字編輯器")
Column {
Row {
width: 600
height: 20
Button {
width: 300
height: 20
text: "開啟"
}
Button {
width: 300
height: 20
text: "存檔"
}
}
Row {
width: 600
height: 200
ScrollView {
id: view
anchors.fill: parent
TextArea {
text: "文字內容\n2\n3\n4\n5\n6\n7\n8\n9\n10\n11\n12\n13\n"
}
}
}
}
}
/* 《程式語言教學誌》的範例程式
http://kaiching.org/
檔名:main.qml
功能:示範文字工具的 GUI 外觀
作者:張凱慶 */
回到練習題目