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

TabView QML Type

A control that allows the user to select one of multiple stacked items.

This type was introduced in Qt 5.1.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

TabView QML Type

Detailed Description

Image non disponible

TabView provides tab-based navigation model for your application. For example, the following snippet uses tabs to present rectangles of different color on each tab page:

 
Sélectionnez
TabView {
    Tab {
        title: "Red"
        Rectangle { color: "red" }
    }
    Tab {
        title: "Blue"
        Rectangle { color: "blue" }
    }
    Tab {
        title: "Green"
        Rectangle { color: "green" }
    }
}

You can create a custom appearance for a TabView by assigning a TabViewStyle.

Tab represents the content of a tab in a TabView.

Property Documentation

 

[read-only, since QtQuick.Controls 1.3] contentItem : Item

This property holds the content item of the tab view.

Tabs declared as children of a TabView are automatically parented to the TabView's contentItem.

This property was introduced in QtQuick.Controls 1.3.

[read-only] count : int

The current tab count

currentIndex : int

The current tab index

frameVisible : bool

The visibility of the tab frame around contents

tabPosition : int

  • Qt.TopEdge (default)

  • Qt.BottomEdge

tabsVisible : bool

The visibility of the tab bar

Method Documentation

 

Tab addTab(string title, Component component)

Adds a new tab with the given title and an optional component.

Returns the newly added tab.

Tab getTab(int index)

Returns the Tab item at index.

Tab insertTab(int index, string title, Component component)

Inserts a new tab at index, with the given title and an optional component.

Returns the newly added tab.

void moveTab(int from, int to)

Moves a tab from index to another.

void removeTab(int index)

Removes and destroys a tab at the given index.

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