なんらアクションは埋め込んでませんが、
コーディングだけでも一応UIを作成できるようです。
実際のところ
myapp.qmlを以下のような感じで記述。
ネタはApplicationWindow内に入れるようですね。
import QtQuick 2.9 import QtQuick.Controls 2.2 ApplicationWindow { visible: true width: 640 height: 480 title: qsTr("Scroll") Rectangle { color: "lightgray" width: 100 height: 200 anchors.horizontalCenter: parent.horizontalCenter property int animatedValue: 0 SequentialAnimation on animatedValue { loops: Animation.Infinite PropertyAnimation { to: 150; duration: 10000 } PropertyAnimation { to: 0; duration: 10000 } } Text { anchors.centerIn: parent text: parent.animatedValue } } ScrollView { anchors.fill: parent Dial { } Button { id: fileButton text: "Menu" onClicked: menu.open() anchors.horizontalCenter: parent.horizontalCenter Menu { id: menu y: fileButton.height MenuItem { text: "New..." } MenuItem { text: "Open..." } MenuItem { text: "Save" } } } } }
レンダーするとこうなります。
分かり辛いですが、四角の中の数字は1~149をいったりきたりしてます
順繰りに並べてくれるわけでもないようですね。
Itemみたいな感じで囲わないといけないのかも。
Menuの方は、こんな感じで展開します。