TG-PlatformPlus/qml/debug/gviewer/ListPanels.qml

34 lines
749 B
QML
Raw Normal View History

2026-03-02 14:29:58 +08:00
import QtQuick
import QtQuick.Layouts
import QtQuick.Controls
import QtQuick.Dialogs
import "./app.js" as App
import "./common"
ListView {
id: root
property var lsBaseName: ""
orientation: ListView.Horizontal
model: ListModel {
id: listModel
}
delegate: ListPanel {
title: model.title
height: parent.height
baseName: model.baseName
}
onLsBaseNameChanged: {
listModel.clear()
var items = _G[lsBaseName]
for (var key in items) {
var handel = items[key]
if (typeof handel !== 'object' || handel === null) {
continue;
}
listModel.append({"title": key, "baseName": lsBaseName})
}
}
}