StatusIndicator QML 类型

指示器显示活动 (或不活动) 状态。 更多...

导入语句: import QtQuick.Extras 1.4
Since: Qt 5.5

特性

详细描述

A StatusIndicator in the active state

处于活动状态的 StatusIndicator。

A StatusIndicator in the inactive state

处于非活动状态的 StatusIndicator。

StatusIndicator 显示活动 (或不活动) 状态。通过使用不同颜色,透过 color 特性,StatusIndicator 可以为这些状态提供额外上下文。例如:

QML 结果
import QtQuick 2.2
import QtQuick.Extras 1.4
Rectangle {
    width: 100
    height: 100
    color: "#cccccc"
    StatusIndicator {
        anchors.centerIn: parent
        color: "green"
    }
}
								

"Green StatusIndicator"

可以为 StatusIndicator 创建自定义外观,通过赋值 StatusIndicatorStyle .

特性文档编制

active : bool

此特性指定指示器是活动的,还是不活动的。

默认值为 false (不活动)。


color : color

此特性指定指示器的颜色当它是活动的。

默认值为 "red" .