Used to define columns in a TableView 或在 TreeView . 更多...
import 语句: | import QtQuick.Controls 1.4 |
Since: | Qt 5.1 |
继承: | QtObject |
TableViewColumn represents a column within a TableView 或 TreeView . It provides properties to decide how the data in that column is presented.
TableView { TableViewColumn { role: "title"; title: "Title"; width: 100 } TableViewColumn { role: "author"; title: "Author"; width: 200 } model: libraryModel }
delegate : Component |
The delegate of the column. This can be used to set the itemDelagate of a TableView or TreeView for a specific column.
In the delegate you have access to the following special properties:
The text elide mode of the column. Allowed values are:
另请参阅 elide .
The horizontal text alignment of the column. Allowed values are:
另请参阅 horizontalAlignment .
Determines if the column should be movable. The default value is
true
.
注意: A non-movable column may get indirectly moved if adjacent columns are movable.
This QML property was introduced in QtQuick.Controls 1.1.
Determines if the column should be resizable.
This QML property was introduced in QtQuick.Controls 1.1.
The model
role
of the column.
The title text of the column.
The visible status of the column.
The current width of the column. The default value depends on platform. If only one column is defined, the width expands to the viewport.
Resizes the column so that the implicitWidth of the contents on every row will fit.
This QML method was introduced in QtQuick.Controls 1.2.