Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3
Wiki Markup
{alias:qsetspacing}

Name

qsetspacing — set spacing between widgets in a layout

...

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

Arguments

layout

The target layout. This may be a qgridlayoutqvboxlayoutqhboxlayout. If no layout object is provided the current layout is used.

Another frequently used layout modifier is qsetmargin.

spacing

Margin space in pixels.

Examples

Ex.1: Layout with spacing

...

No Format
bgColor#eeeeee
borderWidth1

# 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

...