項視圖範例

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.

圖錶範例

The Chart example shows how to create a custom view for the model/view framework.

色彩編輯器工廠範例

This example shows how to create an editor that can be used by a QItemDelegate.

組閤框 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 demonstrates the usage of a tree view, and smooth flicking on a touchscreen.

可編輯樹模型範例

This example shows how to implement a simple item-based tree model that can be used with other classes 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.

Interview

此範例演示模型/視圖框架的用法。

項視圖拼圖範例

The Puzzle example shows how to enable drag and drop with a custom model to allow items to be transferred between a view and another widget.

像素器範例

The Pixelator example shows how delegates can be used to customize the way that items are rendered in standard item views.

簡單 DOM 模型範例

The Simple DOM Model example shows how an existing class can be adapted for use with the model/view framework.

簡單樹模型範例

"簡單樹模型範例" 展示如何使用,具有 Qt 標準視圖類的分層模型。

簡單 Widget 映射器範例

The Simple Widget Mapper example shows how to use a widget mapper to display data from a model in a collection of widgets.

自鏇框委托範例

The Spin Box Delegate example shows how to create an editor for a custom delegate in the model/view framework by reusing a standard Qt editor widget.

電子錶格

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.