Item Views Examples

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.

Address Book

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

Basic Sort/Filter Model Example

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

Combo Widget Mapper Example

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

Custom Sort/Filter Model Example

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

Editable Tree Model Example

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

Fetch More Example

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

Frozen Column Example

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

Simple Tree Model Example

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

Spreadsheet

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

Star Delegate Example

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

© 2024 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.