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 6 Current »

Name

qsetfixedsize — Set fixed widget geometry

Syntax

qsetfixedsize [widget] width height

Description

The qsetfixedsize command sets the widget size, or geometry, in pixels. Once set, the widget size can not be altered interactively or programmatically, other than by a new call to qsetfixedsize. See also qresize and qadjustsize.

Use
qsetfixedesize sparingly. Geometry management is usually best left to QTcl, which takes into account the users operating system and screen resolution to create the best result.

Arguments

widget

Target widget. If not given the current widget is used.

width

Width in pixels.

height

Height in pixels.

Examples

Ex.1: Fixed Window

set w [qwidget ]

set layout [qvboxlayout $w]
set label [qlabel "Hello"]
qaddwidget $layout $label

# Set window size in pixels
qsetfixedsize $w 200 200

qshow $w
		  

Example Fixed Window shows a toplevel window containing a QLabel as an only child.The window size is set explicitly using the qsetfixedsize command.

  • No labels