...
This script creates a button inside a window. When you click this button a new information window will pop up, saying "Hello World!".
Panel | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
This will create a new empty text editor where the graphics window used to be. |
...
No Format | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||
set w [qwidget ] |
A window in QTcl is an instance of a QWidget object, hence the command name. It may be followed by a list of flags. Although rarely used, the flags can be used to modify the widgets look and behaviour. The next statement tells QTcl to delete the widget from memory when it is closed:
...
This command displays a simple information dialog with an 'OK' button, as seen below.
So far we have created the window and the button in memory. No window is yet visible on the screen. To make the window visible we have to invoke the final qshow command.
...