...
Name
qsetverticalheaderlabel — set row label in tablewidget
Syntax
Panel | ||||||
---|---|---|---|---|---|---|
| ||||||
qsetverticalheaderlabel [tablewidget] row text |
Description
The qsetverticalheaderlabel command sets the header text for a given row in a qtablewidget.
To set a column header use qsethorizontalheaderlabel.
Arguments
tablewidget
An instance of qtablewidget. If this argument is not provided the current widget is used, assuming it is a table widget.
row
The row number containing the header.
text
The header text.
Examples
Ex.1: qsetverticalheaderlabel
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} |