在此页面上

Qt XmlListModel

使用XmlListModel 类型可从 XML 数据创建只读模型。它可用作视图元素(如 ListView、PathView 或 GridView)和其他与模型数据交互的元素(如 Repeater)的数据源。

注意: 该模型支持 XPath 查询。它支持简单的斜线分隔路径,可为每个元素选择一个属性。

要使用该模块中的类型,请使用以下行导入该模块:

import QtQml.XmlListModel

API 参考

许可证

Qt Qml XmlListModel 该模块在The Qt Company 的商业许可下可用。此外,它还可以在GNU Lesser General Public License 第 3 版GNU General Public License 第 2 版下使用。更多详情,请参阅Qt Licensing

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.