QML类型说明-ApplicationWindow

来源:互联网 发布:淘宝上哪些童装外贸店 编辑:程序博客网 时间:2024/04/29 21:28

ApplicationWindow

ImportStatement:   importQtQuick.Controls 1.2

Since:  Qt 5.1

Inherits:     Window

 

Properties

contentItem : ContentItem

menuBar : MenuBar

statusBar : Item

toolBar : Item

 

DetailedDescription

ApplicationWindow是一个增加了方便定位组件的窗口。诸如菜单栏,工具栏和与平台依赖无关的状态栏。

ApplicationWindow {

    id:window

    menuBar:MenuBar {

       Menu { MenuItem {...} }

       Menu { MenuItem {...} }

    }

 

    toolBar:ToolBar {

       RowLayout {

           anchors.fill: parent

           ToolButton {...}

       }

    }

 

    TabView{

       id: myContent

       anchors.fill: parent

       ...

    }

}

 

PropertyDocumentation

contentItem : ContentItem

在工具栏和状态栏之间的区域,,这个属性组包含6个属性,分别是区域最小值,包含值,最大值。

Groupedproperty   Description

contentItem.minimumWidth     区域最小宽度

contentItem.minimumHeight   区域最小高度

contentItem.implicitWidth  区域包含的宽度

contentItem.implicitHeight 区域包含的高度

contentItem.maximumWidth    区域的最大宽度

contentItem.maximumHeight   区域的最大高度

 

menuBar : MenuBar

菜单栏的属性,默认不设置。

 

statusBar : Item

状态栏的组件,它能设置成任何类型的组件,但一般设置成StatusBar。默认的这个属性不设置。当我们设置这个属性时,它自动锚定到应用窗口。

 

toolBar : Item

工具栏的组件,它能设置成任何类型的组件,但一般用ToolBar配置。默认不设置,当我们设置这个属性,它自动锚定到应用窗口。
0 0
原创粉丝点击