IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

ApplicationWindow QML Type

Provides a top-level application window.

This type was introduced in Qt 5.1.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

ApplicationWindow QML Type

Detailed Description

Image non disponible

ApplicationWindow is a Window that adds convenience for positioning items, such as MenuBar, ToolBar, and StatusBar in a platform independent manner.

 
Sélectionnez
ApplicationWindow {
    id: window
    visible: true

    menuBar: MenuBar {
        Menu { MenuItem {...} }
        Menu { MenuItem {...} }
    }

    toolBar: ToolBar {
        RowLayout {
            anchors.fill: parent
            ToolButton {...}
        }
    }

    TabView {
        id: myContent
        anchors.fill: parent
        ...
    }
}

By default, an ApplicationWindow is not visible.

The Qt Quick Controls 1 - Gallery example is a good starting point to explore this type.

Property Documentation

 

contentItem : ContentItem

This group holds the size constraints of the content item. This is the area between the ToolBar and the StatusBar. The ApplicationWindow will use this as input when calculating the effective size constraints of the actual window. It holds these 6 properties for describing the minimum, implicit and maximum sizes:

Grouped property

Description

contentItem.minimumWidth

The minimum width of the content item.

contentItem.minimumHeight

The minimum height of the content item.

contentItem.implicitWidth

The implicit width of the content item.

contentItem.implicitHeight

The implicit height of the content item.

contentItem.maximumWidth

The maximum width of the content item.

contentItem.maximumHeight

The maximum height of the content item.

menuBar : MenuBar

By default, this value is not set.

statusBar : Item

This property holds the status bar Item.

It can be set to any Item type, but is generally used with StatusBar.

By default, this value is not set. When you set the status bar item, it will be anchored automatically into the application window.

style : Component

The style Component for the window.

See Also

toolBar : Item

This property holds the toolbar Item.

It can be set to any Item type, but is generally used with ToolBar.

By default, this value is not set. When you set the toolbar item, it will be anchored automatically into the application window.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+