...
The qsethorizontalheaderlabel command sets the header text for a given column in a qtablewidget.
To set a row header use qsetverticalheaderlabel.
Arguments
tablewidget
An instance of qtablewidget. If this argument is not provided the current widget is used, assuming it is a table widget.
...