Wiki Markup |
---|
{alias:qshow} |
Name
qshow — draw widget, making it visible
...
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
...
No Format | ||||
---|---|---|---|---|
| ||||
# 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
|
...