//! [detailed-description]
A \1 provides a styled table header.
It can either be used as an independent view or header for a \l TableView.

You can add a header for a TableView by assigning a \1
to the \l {TableView::syncView} property. The header and the table will
then be kept in sync while flicking.

By default, \1 displays
\l {QAbstractItemModel::headerData()}{header data}
from the \l {TableView::syncView}{sync view's} \l {TableView::model}{model}.
If you don't wish to use this model, you can assign a different model to the
\l {TableView::model}{model} property. If you assign a model that is a
QAbstractItemModel, its header data will be used. Otherwise the data in
the model will be used directly (for example, if you assign a model that
is simply an array of strings).

By default, \l textRole is set to \c "display", meaning that data from the
model's \l {Qt::ItemDataRole}{Qt::DisplayRole} will be used. You can set
this to another role name in order to have that data displayed instead.

The application is responsible for placing the header at the
correct location in the scene. You can add as many headers as you
want to a single TableView, which can be useful if you for example want
to place headers on all four sides of the table.

The following snippet shows how you can add a horizontal and vertical header
view to a table view:

\snippet qtquickcontrols-headerview.qml 0

A \1 will have
\l {TableView::resizableColumns}{resizableColumns} set to \c true by default.
//! [detailed-description]

//! [syncView]
This property holds the TableView to synchronize with.

Once this property is bound to another TableView, both header and table
will synchronize with regard to column widths, column spacing, and flicking
\1.

If the \l model is not explicitly set, then the header will use the syncView's
model to label the columns.

\sa model TableView
//! [syncView]

//! [model]
This property holds the model providing data for the \1 header view.

When model is not explicitly set, the header will use the syncView's
model once syncView is set.

If model is a QAbstractTableModel, its \1 headerData() will
be accessed.

If model is a QAbstractItemModel other than QAbstractTableModel, model's data()
will be accessed.

Otherwise, the behavior is same as setting TableView::model.

\sa TableView {TableView::model} {model} QAbstractTableModel
//! [model]

//! [textRole]
This property holds the model role used to display text in each header cell.

When the model has multiple roles, textRole can be set to determine which
role should be displayed.

If model is a QAbstractItemModel then it will default to "display"; otherwise
it is empty.

\sa QAbstractItemModel::roleNames()
//! [textRole]
