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.
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.
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.
This example demonstrates the usage of the model/view framework.
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.
The Simple DOM Model example shows how an existing class can be adapted for use with the model/view framework.
The Simple Tree Model example shows how to use a hierarchical model with Qt's standard view classes.
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.
© 2023 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.