Tôi cố gắng để sử dụng FolderListModel, theo này exampleQML FolderListModel
như thế này:
ListView
{
anchors.fill: parent
FolderListModel
{
id: foldermodel
folder: "C:/Qt/Projects/"
showDirs: true
showDotAndDotDot: true
nameFilters: ["*"]
sortField : "Name"
}
Component {
id: filedelegate
Text { text: fileName }
}
model: foldermodel
delegate: filedelegate
}
tôi muốn hiển thị tất cả các tập tin/thư mục trong thư mục cơ sở, theo một cách đệ quy. có ai có ý tưởng làm thế nào để làm điều đó?