FolderListModel {
id: fileListModel
folder: "~/.local/share/cadmium.marthamengineering/"; //XDG_DATA_HOME/cadmium.marthamengineering/files/";
nameFilters: [ "*" ]
}
GridView {
anchors.fill: parent
cellWidth: parent.width/3; cellHeight: (parent.width/3)*1.1
focus: true
model: fileListModel
highlight: Rectangle { width: parent.width/3; height: (parent.width/3)*1.1; color: "lightsteelblue" }
delegate: Item {
width:parent.width/3 ; height: (parent.width/3)*1.1
Image {
id: myIcon
width: parent.width/1.1;
//y: 20;
fillMode: Image.PreserveAspectFit
anchors.horizontalCenter: parent.horizontalCenter
source: "cadmium.png"
}
Text {
anchors { top: myIcon.bottom; horizontalCenter: parent.horizontalCenter }
text: model.fileName
}
MouseArea {
anchors.fill: parent
onClicked: parent.GridView.view.currentIndex = index; //console.log(model.filePath)
}
}
}