Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0
Wiki Markup
{alias:qsetfixedsize}
h2. Name

*qsetfixedsize* — Set fixed widget geometry

h2. Syntax
{panel:|borderStyle=solid|borderWidth=1|bgColor=#FFFFAA}

*qsetfixedsize* \[_widget_] _width height_ 

{panel}

h2. 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. 

h2. Arguments
_widget_
{indent}Target widget. If not given the current widget is used. 
{indent}

_width_
{indent}Width in pixels. 
{indent}

_height_
{indent}Height in pixels. 

{indent} 

h2. Examples

h3. Ex.1: Fixed Window
{anchor:Fixed Window}

{noformat:|borderWidth=1|bgColor=#eeeeee}

Name

qsetfixedsize — Set fixed widget geometry

Syntax

Panel
bgColor#FFFFAA
borderWidth1
borderStylesolid

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

width

height

Examples

Ex.1: Fixed Window

Anchor
Fixed Window
Fixed Window

No Format
bgColor#eeeeee
borderWidth1
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
		  
{noformat}

!att:_img_cmd^qsetfixedsize.png!

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

{pagebreak}

Image Added

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