Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Name

qsetheaderlabels — set column headers in a QTreeWidget

Syntax

Panel
bgColor#FFFFAA
borderWidth1
borderStylesolid

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

A QTreeWidget that will have the columns headers.

headers

A Tcl list containing the header labels.

Examples

Ex.1: qsetheaderlabels

Anchor
qsetheaderlabels
qsetheaderlabels

No Format
bgColor#eeeeee
borderWidth1
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. 

Image Added

See also qtreewidget for examples on how to use the qsetheaderlabels command.