QTransposeProxyModel Class▲
-
Header: QTransposeProxyModel
-
Since: Qt 5.13
-
CMake:
find_package(Qt6 REQUIRED COMPONENTS Core)
target_link_libraries(mytarget PRIVATE Qt6::Core)
-
qmake: QT += core
-
Inherits: QAbstractProxyModel
Detailed Description▲
This model will make the rows of the source model become columns of the proxy model and vice-versa.
If the model is a tree, the parents will be transposed as well. For example, if an index in the source model had parent `index(2,0)`, it will have parent `index(0,2)` in the proxy.
Member Function Documentation▲
[explicit] QTransposeProxyModel::QTransposeProxyModel(QObject *parent = nullptr)▲
Constructs a new proxy model with the given parent.
[virtual] QTransposeProxyModel::~QTransposeProxyModel()▲
Destructs the proxy model.
[override virtual] int QTransposeProxyModel::columnCount(const QModelIndex &parent = QModelIndex()) const▲
[override virtual] QVariant QTransposeProxyModel::headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const▲
Reimplements: QAbstractProxyModel::headerData(int section, Qt::Orientation orientation, int role) const.
See Also▲
See also setHeaderData()
[override virtual] QModelIndex QTransposeProxyModel::index(int row, int column, const QModelIndex &parent = QModelIndex()) const▲
[override virtual] bool QTransposeProxyModel::insertColumns(int column, int count, const QModelIndex &parent = QModelIndex())▲
[override virtual] bool QTransposeProxyModel::insertRows(int row, int count, const QModelIndex &parent = QModelIndex())▲
[override virtual] QMap<int, QVariant> QTransposeProxyModel::itemData(const QModelIndex &index) const▲
Reimplements: QAbstractProxyModel::itemData(const QModelIndex &proxyIndex) const.
See Also▲
See also setItemData()
[override virtual] QModelIndex QTransposeProxyModel::mapFromSource(const QModelIndex &sourceIndex) const▲
[override virtual] QModelIndex QTransposeProxyModel::mapToSource(const QModelIndex &proxyIndex) const▲
[override virtual] bool QTransposeProxyModel::moveColumns(const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destinationParent, int destinationChild)▲
[override virtual] bool QTransposeProxyModel::moveRows(const QModelIndex &sourceParent, int sourceRow, int count, const QModelIndex &destinationParent, int destinationChild)▲
[override virtual] QModelIndex QTransposeProxyModel::parent(const QModelIndex &index) const▲
Reimplements: QAbstractItemModel::parent(const QModelIndex &index) const.
[override virtual] bool QTransposeProxyModel::removeColumns(int column, int count, const QModelIndex &parent = QModelIndex())▲
[override virtual] bool QTransposeProxyModel::removeRows(int row, int count, const QModelIndex &parent = QModelIndex())▲
[override virtual] int QTransposeProxyModel::rowCount(const QModelIndex &parent = QModelIndex()) const▲
[override virtual] bool QTransposeProxyModel::setHeaderData(int section, Qt::Orientation orientation, const QVariant &value, int role = Qt::EditRole)▲
Reimplements: QAbstractProxyModel::setHeaderData(int section, Qt::Orientation orientation, const QVariant &value, int role).
See Also▲
See also headerData()
[override virtual] bool QTransposeProxyModel::setItemData(const QModelIndex &index, const QMap<int, QVariant> &roles)▲
Reimplements: QAbstractProxyModel::setItemData(const QModelIndex &index, const QMap<int, QVariant> &roles).
See Also▲
See also itemData()
[override virtual] void QTransposeProxyModel::setSourceModel(QAbstractItemModel *newSourceModel)▲
[override virtual] void QTransposeProxyModel::sort(int column, Qt::SortOrder order = Qt::AscendingOrder)▲
Reimplements: QAbstractProxyModel::sort(int column, Qt::SortOrder order).
This method will perform no action. Use a QSortFilterProxyModel on top of this one if you require sorting.
[override virtual] QSize QTransposeProxyModel::span(const QModelIndex &index) const▲
Reimplements: QAbstractProxyModel::span(const QModelIndex &index) const.