User Tools

Site Tools


k12:k12.1:k12.1.1:start

12.1.1 Form - Properties

This chapter introduces and describes the main properties of the Form (gb.qt4) class.

PropertyData typeDescription
ActionStringSets the action string associated with the component or returns the value (→ Chapter 12.3.3 Action).
ArrangeIntegerDetermines or sets how the container 'Form' arranges its components (→ Chapter 20.7 Arrange).
AutoResizeBooleanDetermines or sets whether the window automatically resizes to fit its contained controls.
BackgroundIntegerSets the background colour or returns the value of the background colour (→ Chapter 25.3.1 Color).
ForegroundIntegerSets the foreground colour or returns the value of the foreground colour (→ Chapter 25.3.1 Color).
BorderBooleanThe 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.
TextStringDetermines or sets the title for the window.
CaptionStringSynonym for the text property.
TitleStringSynonym for the text property.
Children .Container.ChildrenReturns a list of all control elements in the container 'Form'.
Controls .Window.ControlsReturns 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.
ClosedBooleanReturns True if the window was closed.
CursorCursorUse this property to assign a custom cursor (→ Chapter 14.2.4 Cursor).
DropBooleanDetermines or sets whether the window accepts the Drop method.
EnabledBooleanIndicates 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.
ExpandBooleanDetermines or sets whether a control element on the form expands when the Form property 'Arrange' is not set to 'None'.
FontFontSets 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).
FullScreenBooleanDetermines or sets whether the window is displayed in full screen mode.
Height or HIntegerDetermines or sets the height of the form.
Width or WIntegerDetermines or sets the width of the form.
HandleIntegerReturns the internal X11 window handle of the form.
IdIntegerSynonym for the handle property.
HasFocusBooleanReturns whether the form has the focus.
HoveredBooleanReturns whether the mouse cursor is over the form.
Icon PictureSets the picture that is displayed as the window icon or returns the picture.
IndentBooleanDetermines 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.
InvertBooleanDetermines or sets whether the vertical or horizontal alignment of the control elements are swapped.
MarginBooleanSets 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).
PaddingIntegerSets 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).
SpacingBooleanDetermines 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.
PicturePictureThe 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.
MaskBooleanDetermines or sets whether transparent areas of a background image should make the shape transparent in those areas.
MaximisedBooleanDetermines or sets whether the window is maximised.
MinimisedBooleanDetermines or sets whether the window is minimised.
Menus.Window.MenusReturns 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).
ModalBooleanIndicates whether a window is currently displayed modally.
MouseIntegerDetermines or sets the appearance of the cursor over the form (→ Chapter 14.2.1 Mouse and Chapter 14.2.4 Cursor)
NameStringDetermines or sets the name of the window.
OpacityIntegerDetermines or sets the value of the opacity of the window. This property only has an effect when a compositing window manager is running.
PersistentBoolean
PopupMenuString
ResizableBooleanDetermines or sets whether the window can be freely resized.
ScreenIntegerReturns 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).
SkipTaskbarBooleanDetermines 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.
StackingIntegerDetermines 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).
StickyBooleanDetermines or sets whether the window is visible on all virtual desktops (→ Chapter 15.6 Desktop).
TagVariantDetermines or sets the value of the Tag property. The property can be used freely.
TakeFocusBooleanDetermines or sets with the value True (default) that the window gets the focus when it is opened.
TooltipStringDetermines or sets a tooltip to be displayed when the mouse hovers over the window for some time.
TopLevelBooleanIndicates whether the window is a TopLevel window or not.
TopOnlyBooleanDetermines or sets whether a window is positioned above all other windows.
TrackingBooleanDetermines 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.
TransparentBooleanDetermines or sets whether the window background is transparent. In this case, the alpha component of its background colour or image is taken into account.
UtilityBooleanDetermines 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).
VisibleBooleanDetermines or sets whether the window is visible.
WindowWindowReturns the TopLevel window that contains the window.
XIntegerReturns or sets the position of the left window border relative to its container.
YIntegerGet or set the position of the top window border relative to its container.

Table 12.1.1.1 : Properties of the class Form

The website uses a temporary session cookie. This technically necessary cookie is deleted when the browser is closed. You can find information on cookies in our privacy policy.
k12/k12.1/k12.1.1/start.txt · Last modified: 01.02.2022 (external edit)

Page Tools