PySide6.QtCore.QConcatenateTablesProxyModel¶
- class QConcatenateTablesProxyModel¶
- The - QConcatenateTablesProxyModelclass proxies multiple source models, concatenating their rows. More…- Synopsis¶- Methods¶- def - __init__()
- def - addSourceModel()
- def - mapFromSource()
- def - mapToSource()
- def - sourceModels()
 - Note - This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE - Detailed Description¶- QConcatenateTablesProxyModeltakes 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 - QAbstractProxyModelbecause it uses multiple source models, rather than a single one.- Only flat models (lists and tables) are supported, tree models are not. - Constructs a concatenate-rows proxy model with the given - parent.- addSourceModel(sourceModel)¶
- Parameters:
- sourceModel – - QAbstractItemModel
 
 - Adds a source model - sourceModel, below all previously added source models.- The ownership of - sourceModelis not affected by this.- The same source model cannot be added more than once. - mapFromSource(sourceIndex)¶
- Parameters:
- sourceIndex – - QModelIndex
- Return type:
 
 - Returns the proxy index for a given - sourceIndex, which can be from any of the source models.- mapToSource(proxyIndex)¶
- Parameters:
- proxyIndex – - QModelIndex
- Return type:
 
 - Returns the source index for a given - proxyIndex.- removeSourceModel(sourceModel)¶
- Parameters:
- sourceModel – - QAbstractItemModel
 
 - Removes the source model - sourceModel, which was previously added to this proxy.- The ownership of - sourceModelis not affected by this.- sourceModels()¶
- Return type:
- .list of QAbstractItemModel 
 
 - Returns a list of models that were added as source models for this proxy model.