Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

No Format
borderColor#404040
bgColor#F0F0F0
borderWidth1
titleSet window title to "Hello"
borderStyledashed

qsetwindowtitle "Hello"

The qsetwindowtitle command sets the window title. While there may be several windows available, QTcl will simply apply the command to the most recently created widget, which in this case is the QWidget window. The most recently created widget is also the so-called current widget. It does not matter whether the widget is visible or not. This is in fact how most Qt commands work.

...

No Format
borderColor#404040
bgColor#F0F0F0
borderWidth1
titleCreate a push button
borderStyledashed

qpushbutton "Hello world!"

The command qpushbutton creates the conventional button found in user interfaces. There are several types of buttons available in QTcl. Right now this button only has one argument which is the button text. Thus we need a second argument to tell the button what to do when being clicked.

...