TabWidget QML Type

A widget that places its children as tabs 更多...

import 语句: import UIComponents 1.0
继承: Item

特性

详细描述

A TabWidget places its children as tabs in a view. Selecting a tab involves selecting the tab at the top.

The TabWidget component is part of the UI 组件 模块。

This documentation is part of the UIComponents 范例。

Adding Tabs

To add a tab, declare the tab as a child of the TabWidget .

TabWidget {
    id: tabwidget
    Rectangle {
        id: tab1
        color: "red"
        //... omitted
    }
    Rectangle {
        id: tab2
        color: "blue"
        //... omitted
    }
}
					

特性文档编制

current : int

The currently active tab in the TabWidget .

[read-only] sampleReadOnlyProperty : int

A sample 只读 property. A contrived property to demonstrate QDoc's ability to detect read-only properties.

The signature is:

readonly property int sampleReadOnlyProperty: 0
							

Note that the property must be initialized to a value.