Qt 5.6 | Qt Labs Controls | QML Types | ApplicationWindow QML Type

Qt 5.6.3 Reference Documentation

# ApplicationWindow QML Type

Provides a top-level application window. More...

Import Statement: | import Qt.labs.controls 1.0

- List of all members, including inherited members

## Properties

- activeFocusControl : Control
- contentData : list<Object>
- contentItem : Item
- font : font
- footer : Item
- header : Item
- overlay
  - overlay : Item
  - overlay.background : Item

## Attached Properties

- activeFocusControl : Control
- contentItem : Item
- footer : Item
- header : Item
- overlay : Item
- window : ApplicationWindow

## Detailed Description

ApplicationWindow is a Window which makes it convenient to add a header and footer item to the window.

      import Qt.labs.controls 1.0

      ApplicationWindow {
          visible: true

          header: ToolBar {
              // ...
          }

          footer: TabBar {
              // ...
          }

          StackView {
              anchors.fill: parent
          }
      }

ApplicationWindow supports popups via its overlay property, which ensures that popups are displayed above other content and that the background is dimmed when a modal popup is visible.

Note: By default, an ApplicationWindow is not visible.

Note: Types in the Qt.labs module are not guaranteed to remain compatible in future versions.

See also Page and Container Controls.

## Property Documentation

[read-only] activeFocusControl : Control

This property holds the control that currently has active focus, or `null` if there is no control with active focus.

The difference between Window::activeFocusItem and ApplicationWindow::activeFocusControl is that the former may point to a building block of a control, whereas the latter points to the enclosing control. For example, when SpinBox has focus, activeFocusItem points to the editor and acticeFocusControl to the SpinBox itself.

See also Window::activeFocusItem.

[default] contentData : list<Object>

This default property holds the list of all objects declared as children of the window.

See also contentItem.

[read-only] contentItem : Item

This property holds the window content item.

font : font

This property holds the font currently set for the window.

The default font depends on the system environment. QGuiApplication maintains a system/theme font which serves as a default for all application windows. You can also set the default font for windows by passing a custom font to QGuiApplication::setFont(), before loading any QML. Finally, the font is matched against Qt's font database to find the best match.

ApplicationWindow propagates explicit font properties to child controls. If you change a specific property on the window's font, that property propagates to all child controls in the window, overriding any system defaults for that property.

See also Control::font.

footer : Item

This property holds the window footer item. The footer item is positioned to the bottom, and resized to the width of the window. The default value is `null`.

See also header and Page::footer.

header : Item

This property holds the window header item. The header item is positioned to the top, and resized to the width of the window. The default value is `null`.

See also footer and Page::header.

overlay group
overlay : Item
overlay.background : Item

This property holds the window overlay item and its background that implements the background dimming when any modal popups are open. Popups are automatically reparented to the overlay.

See also Popup.

## Attached Property Documentation

[read-only] ApplicationWindow.activeFocusControl : Control

This attached property holds the control that currently has active focus, or `null` if there is no control with active focus. The property can be attached to any item. The value is `null` if the item is not in an ApplicationWindow, or the window has no active focus.

See also Window::activeFocusItem.

[read-only] ApplicationWindow.contentItem : Item

This attached property holds the window content item. The property can be attached to any item. The value is `null` if the item is not in an ApplicationWindow.

[read-only] ApplicationWindow.footer : Item

This attached property holds the window footer item. The property can be attached to any item. The value is `null` if the item is not in an ApplicationWindow, or the window has no footer item.

[read-only] ApplicationWindow.header : Item

This attached property holds the window header item. The property can be attached to any item. The value is `null` if the item is not in an ApplicationWindow, or the window has no header item.

[read-only] ApplicationWindow.overlay : Item

This attached property holds the window overlay item. The property can be attached to any item. The value is `null` if the item is not in an ApplicationWindow.

[read-only] ApplicationWindow.window : ApplicationWindow

This attached property holds the application window. The property can be attached to any item. The value is `null` if the item is not in an ApplicationWindow.