Hey guys,
I have a grid view built off a list model, how would I go about linking each delegate to it’s own individual page?
I have over 200 pages, see below a sample of my code! what would I add to make them clickable to new pages? each page has a custom icon set as you can also see!
Thanks 🙂
import Felgo 3.0
import QtQuick 2.0
import QtQuick 2.7
ListPage {
GridView {
id: gridView
anchors.rightMargin: -50
anchors.leftMargin: 80
anchors.topMargin: 15
anchors.fill: parent
contentHeight: 450
cellWidth: 120
cellHeight: 150
model: ListModel {
ListElement {
name: "name1"
type1: "section1"
icon: "../assets/Sprites/001.png"
}
ListElement {
name: "name2"
type1: "section1"
icon: "../assets/Sprites/002.png"
}
ListElement {
name: "name3"
type1: "section1"
icon: "../assets/Sprites/003.png"
}
ListElement {
name: "name4"
type1: "section1"
icon: "../assets/Sprites/004.png"
}
ListElement {
name: "name5"
type1: "section1"
icon: "../assets/Sprites/005.png"
}
ListElement {
name: "name6"
type1: "section1"
icon: "../assets/Sprites/006.png"
}
delegate: Item {
Text { text: name; color: "black"; anchors.horizontalCenter: parent.horizontalCenter }
Image {
id: myIcon
y: 20; anchors.horizontalCenter: parent.horizontalCenter
source: icon
}
}
}
}