Wiki Markup |
---|
{alias:qsethorizontalheaderlabel}
h2. Name
*qsethorizontalheaderlabel* — set column label in tablewidget
h2. Syntax
{panel:|borderStyle=solid|borderWidth=1|bgColor=#FFFFAA}
*qsethorizontalheaderlabel* \[_tablewidget_] _column text_
{panel}
h2. Description
The *qsethorizontalheaderlabel* command sets the header text for a given column in a [QTableWidget].
To set a row header use [qsetverticalheaderlabel].
h2. Arguments
_tablewidget_
{indent}An instance of [QTableWidget]. If this argument is not provided the current widget is used, assuming it is a table widget.
{indent}
_column_
{indent}The column number containing the header.
text
The header text.
{indent}
h2. Examples
h3. Ex.1: qsethorizontalheaderlabel
{anchor:qsethorizontalheaderlabel}
{noformat:|borderWidth=1|bgColor=#eeeeee} |
Name
qsethorizontalheaderlabel — set column label in tablewidget
Syntax
Panel | ||||||
---|---|---|---|---|---|---|
| ||||||
qsethorizontalheaderlabel [tablewidget] column text |
Description
The qsethorizontalheaderlabel command sets the header text for a given column in a QTableWidget.
To set a row header use qsetverticalheaderlabel.
Arguments
tablewidget
column
Examples
Ex.1: qsethorizontalheaderlabel
Anchor | ||||
---|---|---|---|---|
|
No Format | ||||
---|---|---|---|---|
| ||||
set w [qwidget]
qsetwindowtitle "Simple Table"
qvboxlayout {
qtablewidget 2 3
qsetverticalheaderlabel 0 "Row 1"
qsetverticalheaderlabel 1 "Row 2"
qsethorizontalheaderlabel 0 "First Name"
qsethorizontalheaderlabel 1 "Last Name"
}
qshow $w
{noformat}
!att:_img_cmd^tableheaders.png!
{pagebreak} |