Qt Reference Documentation

QML ApplicationWindow Element

Provides a view template that contains several UI elements. More...

Inherits Window

This element was introduced in Qt Quick Components 1.0.

Properties

Detailed Description

Creates an easy-to-use view that has Window, StatusBar, ToolBar, and PageStack components. This component provides convenience properties that place child components into correct layouts.

Note: This component is experimental, so it may be changed or removed in future releases. It is recommended to use the PageStackWindow component instead.

Using ApplicationWindow

The example below illustrates the ApplicationWindow component's basic usage. The window contains a root Page object which contains a CheckBox. The CheckBox controls the ApplicationWindow's fullScreen property. Setting the ToolBarLayout to the Page's tools property enables the back button in the ToolBar.

 import QtQuick 1.1
 import com.nokia.symbian 1.1

 ApplicationWindow
 {
     id: window
     fullScreen: checkBox.checked

     initialPage: Page {
         id: rootPage
         tools: applicationTools
         CheckBox {
             id: checkBox
             anchors.horizontalCenter: parent.horizontalCenter
             anchors.verticalCenter: parent.verticalCenter
         }
     }

     ToolBarLayout {
         id: applicationTools
         ToolButton {
             flat: true
             iconSource: "toolbar-back"
             onClicked: window.pageStack.depth <= 1 ? Qt.quit() : window.pageStack.pop()
         }
     }
 }

Property Documentation

defaultcontent : list<QtObject>

Enables the application content to be placed directly as a child of ApplicationWindow. The items in ApplicationWindow are laid out between the StatusBar and ToolBar components. Usually you do not need to directly access this property. However, if you create objects dynamically into the application content area, you should use this property as the parent of created objects.


fullScreen : bool

Defines how the application content area fills the screen. If the property is true, the application content area fills the whole screen. If the property is false, the StatusBar and ToolBar components are visible and the application content area fills the area between the StatusBar and ToolBar components.

The default value is false.


initialPage : variant

Sets the initial page of the PageStack. This can be a Page instance, component or an array. Once the construction is completed, the value will be pushed onto the stack. With this property, you can only set the root page of the stack i.e. if there are pages on the stack, changing the initialPage has no effect.

This property group was introduced in Qt Quick Components 1.1.

See also PageStack::push.


pageStack : PageStack

A convenience property provided by ApplicationWindow. The application does not have to use it.


softwareInputPanelEnabled : bool

ApplicationWindows content area size can be adjusted to accomodate software input panel. When proberty is set true size is adjusted. With false content size is not adjusted.

The default value is false.

This property group was introduced in Qt Quick Components 1.1.