This chapter introduces and describes the main properties of the Form (gb.qt4) class.
Property | Data type | Description |
---|---|---|
Action | String | Sets the action string associated with the component or returns the value (→ Chapter 12.3.3 Action). |
Arrange | Integer | Determines or sets how the container 'Form' arranges its components (→ Chapter 20.7 Arrange). |
AutoResize | Boolean | Determines or sets whether the window automatically resizes to fit its contained controls. |
Background | Integer | Sets the background colour or returns the value of the background colour (→ Chapter 25.3.1 Color). |
Foreground | Integer | Sets the foreground colour or returns the value of the foreground colour (→ Chapter 25.3.1 Color). |
Border | Boolean | The value can be read or set. For the value True (default) the window has a border. Frameless windows may not be fully managed by the window manager. |
Text | String | Determines or sets the title for the window. |
Caption | String | Synonym for the text property. |
Title | String | Synonym for the text property. |
Children | .Container.Children | Returns a list of all control elements in the container 'Form'. |
Controls | .Window.Controls | Returns a list of all control elements that belong to this window. In contrast to the Children property, this property lists all recursively contained control elements. |
Closed | Boolean | Returns True if the window was closed. |
Cursor | Cursor | Use this property to assign a custom cursor (→ Chapter 14.2.4 Cursor). |
Drop | Boolean | Determines or sets whether the window accepts the Drop method. |
Enabled | Boolean | Indicates that the form is active. All events raised by the Control class are native. Note that the events are also fired when the Enabled property is set to FALSE. |
Expand | Boolean | Determines or sets whether a control element on the form expands when the Form property 'Arrange' is not set to 'None'. |
Font | Font | Sets or returns the font for the form. To change the font at runtime, you can assign the Font property of another control element or create a Font object from a string that describes the font (→ Chapter 23.2.2 Font). |
FullScreen | Boolean | Determines or sets whether the window is displayed in full screen mode. |
Height or H | Integer | Determines or sets the height of the form. |
Width or W | Integer | Determines or sets the width of the form. |
Handle | Integer | Returns the internal X11 window handle of the form. |
Id | Integer | Synonym for the handle property. |
HasFocus | Boolean | Returns whether the form has the focus. |
Hovered | Boolean | Returns whether the mouse cursor is over the form. |
Icon | Picture | Sets the picture that is displayed as the window icon or returns the picture. |
Indent | Boolean | Determines or sets whether the control elements of the form are indented. The width of the indentation corresponds to the value of Desktop.Scale in pixels. The direction of the indentation is the direction of the arrangement of the controls in the form. |
Invert | Boolean | Determines or sets whether the vertical or horizontal alignment of the control elements are swapped. |
Margin | Boolean | Sets or returns the distance between the control elements and the form margin. The distance is the value of Desktop.Scale (Pixel). If you also define the Padding property, the value of the Margin property is determined by the value of Padding (→ 18.01 Container Properties). |
Padding | Integer | Sets the distance between the control elements and the inner margin of the form. With the help of padding you can control the effect of margin more precisely. If the value is not defined and thus p.d. 0, the distance corresponds to the value of Desktop.Scale (Pixel) (→ 18.01 Container properties). |
Spacing | Boolean | Determines or sets whether the control elements on the form have a fixed spacing from each other. The spacing corresponds to the value of Desktop.Scale (pixels). If you also set the Padding property, the spacing is equal to the value of Padding. |
Picture | Picture | The background picture of the shape can be set or returned. If the Mask property is set, the proportion of transparent pixels of the image is used to define a transparent area of the shape. |
Mask | Boolean | Determines or sets whether transparent areas of a background image should make the shape transparent in those areas. |
Maximised | Boolean | Determines or sets whether the window is maximised. |
Minimised | Boolean | Determines or sets whether the window is minimised. |
Menus | .Window.Menus | Returns a list of all menus in the window's menu bar. If a window has no visible menus, the menu bar is automatically hidden (→ Chapter 13 Menus). |
Modal | Boolean | Indicates whether a window is currently displayed modally. |
Mouse | Integer | Determines or sets the appearance of the cursor over the form (→ Chapter 14.2.1 Mouse and Chapter 14.2.4 Cursor) |
Name | String | Determines or sets the name of the window. |
Opacity | Integer | Determines or sets the value of the opacity of the window. This property only has an effect when a compositing window manager is running. |
Persistent | Boolean | |
PopupMenu | String | |
Resizable | Boolean | Determines or sets whether the window can be freely resized. |
Screen | Integer | Returns the monitor index indicating on which monitor the window is located. If the window is displayed on several monitors at the same time, only one index is returned (→ Chapter 15.7 Screens). |
SkipTaskbar | Boolean | Determines whether the window is displayed in the desktop task bar or not. You can prevent the display in the Desktop-TaskBar with the value True. The default value is False. |
Stacking | Integer | Determines or sets the stacking group of the window. Windows on the desktop can belong to one of three stacking groups. The property can have one of the following values: Window.Normal (0), Window.Above (1) or Window.Below (2). |
Sticky | Boolean | Determines or sets whether the window is visible on all virtual desktops (→ Chapter 15.6 Desktop). |
Tag | Variant | Determines or sets the value of the Tag property. The property can be used freely. |
TakeFocus | Boolean | Determines or sets with the value True (default) that the window gets the focus when it is opened. |
Tooltip | String | Determines or sets a tooltip to be displayed when the mouse hovers over the window for some time. |
TopLevel | Boolean | Indicates whether the window is a TopLevel window or not. |
TopOnly | Boolean | Determines or sets whether a window is positioned above all other windows. |
Tracking | Boolean | Determines or sets whether the window should process MouseMove events. Some controls will not work correctly without processing MouseMove events. They can also receive MouseMove events if this property is False. |
Transparent | Boolean | Determines or sets whether the window background is transparent. In this case, the alpha component of its background colour or image is taken into account. |
Utility | Boolean | Determines or sets whether the window should be considered a utility window as defined by the Freedesktop standard (→ http://standards.freedesktop.org/wm-spec/1.4/ar01s05.html). |
Visible | Boolean | Determines or sets whether the window is visible. |
Window | Window | Returns the TopLevel window that contains the window. |
X | Integer | Returns or sets the position of the left window border relative to its container. |
Y | Integer | Get or set the position of the top window border relative to its container. |
Table 12.1.1.1 : Properties of the class Form