Pages
API Documentation
On this page

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

List of all members, including inherited members

Public Types

Properties

Public Functions

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

enum KColumnHeadersModel::ExtraRoles

Constant
KColumnHeadersModel::SortRole 0x011D910E

Property Documentation

sortColumn : int

Access functions:

  • int sortColumn() const
  • void setSortColumn(int newSortColumn)

Notifier signal:

  • void sortColumnChanged()

sortOrder : Qt::SortOrder

Access functions:

  • Qt::SortOrder sortOrder() const
  • void setSortOrder(Qt::SortOrder newSortOrder)

Notifier signal:

  • void sortOrderChanged()

sourceModel : QAbstractItemModel*

Access functions:

  • QAbstractItemModel *sourceModel() const
  • void setSourceModel(QAbstractItemModel *newSourceModel)

Notifier signal:

  • void sourceModelChanged()

Member Function Documentation

[explicit] KColumnHeadersModel::KColumnHeadersModel(QObject *parent = nullptr)

We use cookies to personalize content and to analyze our traffic. Please decide if you are willing to accept cookies from our website.