Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0
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}

Name

qlabel — read only text field

Syntax

Panel
bgColor#FFFFAA
borderWidth1
borderStylesolid

qlabel [text]

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.

Arguments

text

Examples

Ex.1: Simple label

Anchor
Simple label
Simple label

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

Image Added

Example Simple label shows a toplevel window containing a QLabel as an only child.

Ex.2:

...

HTML

...

label

...

Anchor
HTML label
HTML label

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

Image Added

Example HTML label shows a QLabel with HTML formatted text.

Ex.3:

...

Label

...

with

...

pixmap

...

Anchor
Label with pixmap
Label with pixmap

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

Image Added

Example Label with pixmap shows a label with a pixmap.