import QtQuick 2.12 import QtQuick.Controls 2.12 import QtQuick.Layouts 1.12 import QtQuick.Window 2.12 Window { visible: true width: 640 height: 480 title: qsTr("Hello World") Component { id: page1 Page { header: ToolBar {} ListView { anchors.fill: parent model: 30 delegate: ItemDelegate { width: parent.width text: model.index onClicked: stackView.push(page2) font.pixelSize: 20 contentItem: RowLayout { ColumnLayout { Layout.fillWidth: true Label { text: "Hello" } Label { text: "There_" + model.index } } } } } } } Component { id: page2 Page { header: ToolBar {} Button { anchors.centerIn: parent width: 100 height: 100 text: "Back" onClicked: stackView.pop() } } } StackView { id: stackView anchors.fill: parent initialItem: page1 } }