QConcatenateTablesProxyModel Class

The QConcatenateTablesProxyModel class proxies multiple source models, concatenating their rows. More...

Header: #include <QConcatenateTablesProxyModel>
qmake: QT += core
Since: Qt 5.13
Inherits: QAbstractItemModel

This class was introduced in Qt 5.13.

Detailed Description

QConcatenateTablesProxyModel takes multiple source models and concatenates their rows.

In other words, the proxy will have all rows of the first source model, followed by all rows of the second source model, and so on.

If the source models don't have the same number of columns, the proxy will only have as many columns as the source model with the smallest number of columns. Additional columns in other source models will simply be ignored.

Source models can be added and removed at runtime, and the column count is adjusted accordingly.

This proxy does not inherit from QAbstractProxyModel because it uses multiple source models, rather than a single one.

Only flat models (lists and tables) are supported, tree models are not.

See also QAbstractProxyModel, Model/View Programming, QIdentityProxyModel, and QAbstractItemModel.