About 181,000 results
Open links in new tab
  1. Simple Tree Model Example | Qt Widgets | Qt 6.9.0

    The Simple Tree Model example shows how to use a hierarchical model with Qt's standard view classes. Qt's model/view architecture provides a standard way for views to manipulate information in a data source, using an abstract model of the data to …

  2. QTreeView Class | Qt Widgets | Qt 6.9.0

    A QTreeView implements a tree representation of items from a model. This class is used to provide standard hierarchical lists that were previously provided by the QListView class, but using the more flexible approach provided by Qt's model/view architecture. The QTreeView class is one of the Model/View Classes and is part of Qt's model/view ...

  3. QTreeWidget Class | Qt Widgets | Qt 6.9.0

    The QTreeWidget class is a convenience class that provides a standard tree widget with a classic item-based interface similar to that used by the QListView class in Qt 3. This class is based on Qt's Model/View architecture and uses a default model to hold items, each of which is a QTreeWidgetItem.

  4. c++ - Creating Qt models for tree views - Stack Overflow

    I'm writing an application in Qt (with C++) and I need to represent an object structure in a tree view. One of the ways to do this is to create a model for this, but I'm still quite confused after reading the Qt documentation about the subject.

  5. Qt Programming: A Deep Dive into QTreeView::setModel () and its ...

    Apr 26, 2025 · Model-View Architecture Qt employs a Model-View architecture. This separates the data representation (model) from how it's visually presented (view). This separation enhances flexibility and maintainability. A QStandardItemModel is created with 3 rows and 1 column. The setModel () function connects the QStandardItemModel to the QTreeView.

  6. Example of a hierarchical tree model in Qt. - GitHub

    Example of a hierarchical tree model in Qt. The example uses Qt 5 and libxml2 (via libxxxml) to work on XML trees and libxfsx to work on binary files encoded in the BER ASN.1 flavour. It implements an abstract tree model and provides an adaptor to QAbstractItemModel. In addition to that, a generic Undo/Redo class interfaces with QAbstractItemModel.

  7. Trees, tree models and tree views in Qt - Meetingcpp

    Jul 30, 2015 · There is a very nice example in the Qt documentation which I did use for guidance in how to implement a tree model for Qt correctly. The simple tree model example implements only two classes, TreeItem for the tree, and TreeModel for plugging the tree later in a QTreeView.

  8. qt - Create class by inheriting from QTreeView - Stack Overflow

    Jul 11, 2011 · Anyhow, I built a simple class inheriting from QTreeView with a generic ctor and dtor that just calls the QTreeView methods. As for drawRow, however, I ran into the following problem. The QTreeView::drawRow function starts out like this:

  9. QTree model architecture - Qt Forum

    May 15, 2012 · Hi all, I have a view/model application using QTreeView and a proxy (all code in PySide/Cython/numpy). I use to sort my tree (depth up to 7) using my own function but it was quite difficult to propagate modifications and I think, at the end, the applicati...

  10. Model/View Programming | Qt Widgets | Qt 6.9.0

    Trees or hierarchical lists of items are provided by the QTreeWidget and QTreeWidgetItem classes. Each item in the tree widget can have child items of its own, and can display a number of columns of information. Tree widgets are created just like any other widget:

Refresh