Versions Compared

Key

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

...

No Format
borderColor#404040
bgColor#F0F0F0
borderWidth1
titleCreate a layout
borderStyledashed

qvboxlayout {
	
}

The qvboxlayout command creates a layout manager for the window. A layout manager is also known as a geometry manager. The task of the layout manager is to arrange the widgets in a particular order. For instance, the QVBoxLayout layout manager stacks widgets vertically in their order of creation. There are two other layout managers in QTcl:

...

Your script should now look something like this:

No Format
borderColor#404040
bgColor#eeeeee#F0F0F0
borderWidth1
titleFinal script
borderStyledashed
# Create toplevel window
set w [qwidget ]

# Delete window from memory when closing
qsetattribute deleteonclose

qsetwindowtitle "Hello"

# Arrange contents vertically
qvboxlayout {
	# Create a button that show an information dialog when pushed
	qpushbutton "Hello world!" { qinformation Information "Hello world!" }
}

# Make window visible
qshow $w

...