继承: | |
继承者: |
alternatingRowColors : bool |
This property is set to
true
if the view alternates the row color. The default value is
true
.
backgroundVisible : bool |
This property determines if the background should be filled or not.
默认值为
true
.
注意: The rowDelegate is not affected by this property
[read-only] columnCount : int |
The current number of columns
: |
This is the content footer of the view.
contentHeader : Component |
This is the content header of the view.
headerDelegate : Component |
This property defines a delegate to draw a header.
In the header delegate you have access to the following special properties:
headerVisible : bool |
This property determines if the header is visible. The default value is
true
.
rowDelegate : Component |
This property defines a delegate to draw a row.
In the row delegate you have access to the following special properties:
注意:
For performance reasons, created delegates can be recycled across multiple table rows. This implies that when you make use of implicit properties such as
styleData.row
or
model
, these values can change after the delegate has been constructed. This means that you should not assume that content is fixed when
Component.onCompleted
is called, but instead rely on bindings to such properties.
selectionMode : int |
此枚举指示视图如何响应用户选择:
The possible modes are:
This property was introduced in QtQuick.Controls 1.1.
sortIndicatorColumn : int |
Index of the current sort column. The default value is
0
.
sortIndicatorOrder : int |
This sets the sorting order of the sort indicator The allowed values are:
sortIndicatorVisible : bool |
This property shows or hides the sort indicator The default value is
false
.
注意: The view itself does not sort the data.
TableViewColumn addColumn ( 对象 column ) |
添加 column and returns the added column.
The
column
argument can be an instance of
TableViewColumn
, or a Component. The component has to contain a
TableViewColumn
. Otherwise
null
被返回。
TableViewColumn getColumn ( int index ) |
Returns the column at the given
index
or
null
若
index
无效。
TableViewColumn insertColumn ( int index , 对象 column ) |
插入 column 在给定 index and returns the inserted column.
The
column
argument can be an instance of
TableViewColumn
, or a Component. The component has to contain a
TableViewColumn
. Otherwise
null
被返回。
Moves a column from index to another.
void removeColumn ( int index ) |
Removes and destroys a column at the given index .
Resizes all columns to ensure that the column contents and the headers will fit.
This method was introduced in QtQuick.Controls 1.2.