Wiki Markup |
---|
{alias:qsetheaderlabels}
h2. Name
*qsetheaderlabels* — set column headers in a QTreeWidget
h2. Syntax
{panel:|borderStyle=solid|borderWidth=1|bgColor=#FFFFAA}
*qsetheaderlabels* \[_treewidget_] _headers_
{panel}
h2. Description
The *qsetheaderlabels* command sets the columns headers in a [QTreeWidget]. The labels must be provided as a Tcl list. The QTreeWidget may be given as the first argument, or else the current widget (assuming it is a QTreeWidget) will be used.
{note}
No items can be added to a treewidget before the header columns are in place.
{note}
h2. Arguments
_treewidget_
{indent}A QTreeWidget that will have the columns headers.
{indent}
_headers_
{indent}A Tcl list containing the header labels.
{indent}
h2. Examples
h3. Ex.1: qsetheaderlabels
{anchor:qsetheaderlabels}
{noformat:|borderWidth=1|bgColor=#eeeeee} |
Name
qsetheaderlabels — set column headers in a QTreeWidget
Syntax
Panel |
---|
bgColor | #FFFFAA |
---|
borderWidth | 1 |
---|
borderStyle | solid |
---|
|
qsetheaderlabels [treewidget] headers |
Description
The qsetheaderlabels command sets the columns headers in a QTreeWidget. The labels must be provided as a Tcl list. The QTreeWidget may be given as the first argument, or else the current widget (assuming it is a QTreeWidget) will be used.
Note |
---|
No items can be added to a treewidget before the header columns are in place. |
Arguments
treewidget
headers
Examples
Ex.1: qsetheaderlabels
Anchor |
---|
| qsetheaderlabels |
---|
| qsetheaderlabels |
---|
|
No Format |
---|
bgColor | #eeeeee |
---|
borderWidth | 1 |
---|
|
set w [qwidget]
qsetwindowtitle QTreeWidget
qvboxlayout {
set tree [qtreewidget]
qsetheaderlabels { File Path }
qtreewidgetitem $tree { "File" c:/File } 1
}
qshow $w
{noformat}
!att:_img_cmd^qsetheaderlabels.png!
See also [qtreewidget] for examples on how to use the *qsetheaderlabels* command.
{pagebreak} |
Image Added
See also qtreewidget for examples on how to use the qsetheaderlabels command.