Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0
Wiki Markup
{alias:qshow}
h2. Name

*qshow* — draw widget, making it visible

h2. Syntax
{panel:|borderStyle=solid|borderWidth=1|bgColor=#FFFFAA}

*qshow* \[_widget_]

{panel}

h2. Description

The *qshow* command makes visible the given widget. Any child widgets the widget may have are also shown. 

QTcl makes a distinction between creating widgets and showing them. A QTcl script will typically have several commands that just create widgets in memory with a final qshow at the end, at which point the widgets are made visible. The current widget may be made invisible using the [qclose] command. 

h2. Arguments

_widget_
{indent}Any widget. If a widget is not provided as argument the current widget is used. 

{indent} 

h2. Examples

h3. Ex.1: Displaying a widget
{anchor:Displaying a widget}

{noformat:|borderWidth=1|bgColor=#eeeeee}

Name

qshow — draw widget, making it visible

Syntax

Panel
bgColor#FFFFAA
borderWidth1
borderStylesolid

qshow [widget]

Description

The qshow command makes visible the given widget. Any child widgets the widget may have are also shown.

QTcl makes a distinction between creating widgets and showing them. A QTcl script will typically have several commands that just create widgets in memory with a final qshow at the end, at which point the widgets are made visible. The current widget may be made invisible using the qclose command.

Arguments

widget

Examples

Ex.1: Displaying a widget

Anchor
Displaying a widget
Displaying a widget

No Format
bgColor#eeeeee
borderWidth1
# Window to be shown and closed
set w [qwidget]
qsetwindowtitle "Child"
qshow $w

# Controller window
set c [qwidget]
qsetwindowtitle Controller
qhboxlayout {
	qpushbutton Show { qshow $w }
	qpushbutton Close { qclose $w }
}

qshow $c
{noformat}

The

...

example

...

Displaying

...

a

...

widget

...

creates

...

two

...

windows,

...

one

...

with

...

buttons

...

to

...

toggle

...

the

...

visibility

...

of

...

the

...

other.

...

The

...

"Child"

...

window

...

is

...

never

...

deleted

...

in

...

memory,

...

even

...

when

...

subjected

...

to

...

a

...

close

...

operation.

...

If

...

the

...

qdeleteonclose

...

attribute

...

is

...

set,

...

however,

...

closing

...

the

...

window

...

will

...

also

...

remove

...

all

...

widget

...

data

...

from

...

memory,

...

in

...

which

...

it

...

can

...

not

...

be

...

shown

...

anymore.

...

Image Added