StatusBar QML Type

Contains status information in your app. 更多...

导入语句: import QtQuick.Controls 1.4
Since: Qt 5.1
继承:

FocusScope

特性

详细描述

The common way of using StatusBar is in relation to ApplicationWindow .

Note that the StatusBar does not provide a layout of its own, but requires you to position its contents, for instance by creating a RowLayout .

If only a single item is used within the StatusBar, it will resize to fit the implicitHeight of its contained item. This makes it particularly suitable for use together with layouts. Otherwise the height is platform dependent.

import QtQuick.Controls 1.2
import QtQuick.Layouts 1.0
ApplicationWindow {
    statusBar: StatusBar {
        RowLayout {
            anchors.fill: parent
            Label { text: "Read Only" }
        }
    }
}
					

特性文档编制

[read-only] contentItem : Item

This property holds the content Item of the status bar.

Items declared as children of a StatusBar are automatically parented to the StatusBar 's contentItem. Items created dynamically need to be explicitly parented to the contentItem:

注意: The implicit size of the StatusBar is calculated based on the size of its content. If you want to anchor items inside the status bar, you must specify an explicit width and height on the StatusBar 本身。


style : 组件

The style Component for this control.

另请参阅 StatusBarStyle .