项目视图示例
Qt 提供了大量功能,可通过不同方式显示预先定义和用户定义的项目模型。模型/视图架构所引入的功能分离为开发人员提供了更大的灵活性来定制项目的显示方式。
地址簿示例展示了如何使用代理模型来显示单个模型数据的不同视图。 | |
基本排序/过滤模型示例说明了如何使用 QSortFilterProxyModel 执行基本排序和过滤。 | |
组合部件映射器示例展示了如何使用自定义委托将模型中的信息映射到表单上的特定部件。 | |
自定义排序/过滤模型示例说明了如何子类化 QSortFilterProxyModel 以执行高级排序和过滤。 | |
该示例展示了如何实现一个简单的基于项目的树形模型,该模型可与模型/视图框架中的其他类一起使用。 | |
Fetch More 示例展示了如何按需向项目视图模型添加项目。 | |
该示例演示了如何冻结 QTableView 中的一列。 | |
简单树模型示例展示了如何使用 Qt 的标准视图类来创建分层模型。 | |
电子表格示例展示了如何创建一个简单的电子表格应用程序。 | |
星形委托示例展示了如何创建一个可自行绘制并支持编辑的委托。 |
© 2025 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.