Wiki Markup |
---|
{alias:qlabel}
h2. Name
*qlabel* — read only text field
h2. Syntax
{panel:|borderStyle=solid|borderWidth=1|bgColor=#FFFFAA}
*qlabel* \[_text_]
{panel}
h2. Description
The *qlabel* command creates a QLabel object. This widget shows a read-only text label or a pixmap. The text may be in HTML.
The label text may be set anytime using the [qsettext] command. To read the text use the [qtext] command.
A label may also show a pixmap instead of text. To set the pixmap use the [qsetpixmap] command.
h2. Arguments
_text_
{indent}The label text.
{indent}
h2. Examples
h3. Ex.1: Simple label
{anchor:Simple label}
{noformat:|borderWidth=1|bgColor=#eeeeee}
set w [qwidget ]
qsetwindowtitle QLabel
qvboxlayout {
qlabel "My label"
}
qshow $w
{noformat}
!att:_img_cmd^simple_label.png!
Example +Simple label+ shows a toplevel window containing a QLabel as an only child.
h3. Ex.2: HTML label
{anchor:HTML label}
{noformat:|borderWidth=1|bgColor=#eeeeee}
set w [qwidget ]
qsetwindowtitle QLabel
qvboxlayout {
qlabel "My <em>HTML</em> <b>label</b>"
}
qshow $w
{noformat}
!att:_img_cmd^html_label.png!
Example +HTML label+ shows a QLabel with HTML formatted text.
h3. Ex.3: Label with pixmap
{anchor:Label with pixmap}
{noformat:|borderWidth=1|bgColor=#eeeeee}
set w [qwidget ]
qsetwindowtitle QLabel
qvboxlayout {
set l [qlabel ]
set pm [qpixmap c:/structured_points.xpm]
qsetpixmap $l $pm
}
qshow $w
{noformat}
!att:_img_cmd^qlabel_pixmap.png!
Example +Label with pixmap+ shows a label with a pixmap.
{pagebreak}
|
Page Comparison
General
Content
Integrations