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) |
| Inherits: | QAbstractListModel |
Public Types
Properties
Public Functions
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.
Member Type Documentation
| Constant | Value |
KColumnHeadersModel::SortRole | 0x011D910E |
Property Documentation
sortColumn : int
Access functions:
| int | sortColumn() const |
| void | setSortColumn(int newSortColumn) |
Notifier signal:
Access functions:
| Qt::SortOrder | sortOrder() const |
| void | setSortOrder(Qt::SortOrder newSortOrder) |
Notifier signal:
Access functions:
| QAbstractItemModel * | sourceModel() const |
| void | setSourceModel(QAbstractItemModel *newSourceModel) |
Notifier signal:
| void | sourceModelChanged() |
Member Function Documentation
KColumnHeadersModel::KColumnHeadersModel(QObject *parent = nullptr)