add quick item to quick view dynamically

This commit is contained in:
王劲鹏
2021-02-19 15:43:09 +08:00
committed by osborn
parent df8b98bc6c
commit 7ced952a57
15 changed files with 97 additions and 20 deletions

View File

@@ -0,0 +1,32 @@
import QtQuick 2.12
import QtQuick.Controls 2.5
ApplicationWindow {
visible: true
width: 960
height: 720
title: qsTr("Scroll")
ScrollView {
anchors.fill: parent
ListView {
width: parent.width
model: 1
delegate: Rectangle {
Column {
anchors.centerIn: parent
Text {
text: {return "Snake.js"}
}
}
width: parent.width
height: 60
MouseArea {
anchors.fill: parent
onClicked: {demoBridge.navigate(index)}
}
}
}
}
}

View File

@@ -0,0 +1,8 @@
import QtQuick 2.12
import QtQuick.Controls 2.5
Rectangle {
width: 100
height: 100
color: 'red'
}

View File

@@ -0,0 +1,6 @@
; This file can be edited to change the style of the application
; Read "Qt Quick Controls 2 Configuration File" for details:
; http://doc.qt.io/qt-5/qtquickcontrols2-configuration.html
[Controls]
Style=Default

View File

@@ -0,0 +1,6 @@
import QtQuick 2.12
import QtQuick.Controls 2.5
StackView {
}

View File

@@ -0,0 +1,6 @@
import QtQuick 2.12
import QtQuick.Controls 2.5
StackView {
}