KColumnHeadersModel Class

A model that converts a model's headers into a list model. More...

Header: #include <KColumnHeadersModel>
CMake: find_package(KF6 REQUIRED COMPONENTS ItemModels)
target_link_libraries(mytarget PRIVATE KF6::ItemModels)
Since: KDE Frameworks 5.66

Public Functions

void setSortColumn(int newSortColumn)
void setSortOrder(Qt::SortOrder newSortOrder)
void setSourceModel(QAbstractItemModel *newSourceModel)
int sortColumn() const
Qt::SortOrder sortOrder() const
QAbstractItemModel *sourceModel() const

Signals

Detailed Description

This model will expose the source model's headers as a simple list. This is mostly useful as a helper for QML applications that want to display a model's headers.

Each columns's header will be presented as a row in this model. Roles are forwarded directly to the source model's headerData() method.