スクロールのプロジェクト
適切な名前
UIのテーマを決めます。
折角なので、新しめなImagineに
ちゃんと終わると、こんな感じになるはず
ファイルをみるとこんな感じです
main.qml
import QtQuick 2.9 import QtQuick.Controls 2.2 ApplicationWindow { visible: true width: 640 height: 480 title: qsTr("Scroll") ScrollView { anchors.fill: parent ListView { width: parent.width model: 20 delegate: ItemDelegate { text: "Item " + (index + 1) width: parent.width } } } }
ビルド
実行
結果
ためしに、ListViewの内容を以下のように修正
ListView { width: parent.width model: 3 delegate: ItemDelegate { text: "MyWork " + (index + 1) width: parent.width } }
リビルド
結果
これでは折角のUIライブラリの旨みがまるで分からないので
次回はボタンやスライダーをアレコレ配置してみようと思います。