Versions Compared

Key

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

...

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

Any widget. If a widget is not provided as argument the current widget is used.

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. 

!att:_img_cmd^qshow.png!

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