Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

Unknown macro: {alias}

Name

qsetspacing — set spacing between widgets in a layout

Syntax

qsetspacing [layout] spacing

Description

The qsetspacing command sets the spacing between the widgets in the layout object.

Arguments

layout

spacing

Examples

Ex.1: Layout with spacing

# explicit layout with spacing
set w1 [qwidget ]
qsetwindowtitle "Layout Spacing"
set layout [qhboxlayout $w1]
qsetspacing $layout 30
set label [qlabel "<---------->"]
qaddwidget $layout $label
set label [qlabel "<---------->"]
qaddwidget $layout $label
qshow $w1

# implicit layout with spacing
set w1 [qwidget ]
qsetwindowtitle "Layout Spacing"
qhboxlayout {
	qsetspacing 30
	qlabel "<------------>"
	qlabel "<------------>"
}

qshow $w1

The arrows displayed in the example above would usually have been aligned immediately next to each other. Now that the layout has its spacing parameter set the spacing too will be accordingly.

  • No labels