项视图范例

Qt provides a lot of capabalities to display pre- and user-defined item models in different ways. The separation of functionality introduced by the model/view architecture gives developers greater flexibility to customize the presentation of items.

地址簿

The address book example shows how to use proxy models to display different views onto data from a single model.

基本排序/过滤模型范例

The Basic Sort/Filter Model example illustrates how to use QSortFilterProxyModel to perform basic sorting and filtering.

组合框 Widget 映射器范例

The Combo Widget Mapper example shows how to use a custom delegate to map information from a model to specific widgets on a form.

自定义排序/过滤模型范例

The Custom Sort/Filter Model example illustrates how to subclass QSortFilterProxyModel to perform advanced sorting and filtering.

可编辑树模型范例

This example shows how to implement a simple item-based tree model that can be used with other classes in the model/view framework.

抓取更多范例

The Fetch More example shows how to add items to an item view model on demand.

冻结列范例

This example demonstrates how to freeze a column within a QTableView.

简单树模型范例

The Simple Tree Model example shows how to use a hierarchical model with Qt's standard view classes.

电子表格

The Spreadsheet example shows how to create a simple spreadsheet application.

星号委托范例

The Star Delegate example shows how to create a delegate that can paint itself and that supports editing.