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

Qt Quick Extras Overview

A set of UI controls to create user interfaces in Qt Quick.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

Qt Quick Extras Overview

Qt Quick Extras provide a set of UI controls to create user interfaces in Qt Quick.

Getting Started

 

Building

If you are building Qt Quick Extras from source, you can follow the steps used for most Qt modules:

 
Sélectionnez
qmake
make
make install

Using the Controls

The QML types can be imported into your application using the following import statement in your .qml file.

 
Sélectionnez
import QtQuick.Extras 1.4

Interactive controls

  • DelayButton: A checkable button that triggers an action when held in long enough.

  • Dial: A circular dial that is rotated to set a value.

  • PieMenu: A popup menu that displays several menu items along an arc.

  • ToggleButton: A push button that toggles between two states.

  • Tumbler: A control that can have several spinnable wheels, each with items that can be selected.

Non-interactive controls

  • CircularGauge: A gauge that displays a value within a range along an arc.

  • Gauge: A straight gauge that displays a value within a range.

  • Picture: An indicator that displays a colorized QPicture icon.

  • StatusIndicator: An indicator that displays active or inactive states.

Creating a basic example

A basic example of a QML file that makes use of controls is shown here:

 
Sélectionnez
import QtQuick 2.2
import QtQuick.Extras 1.4

Rectangle {
    DelayButton {
        anchors.centerIn: parent
    }
}

For an interactive showcase of the controls provided by Qt Quick Extras, you can look at the Gallery example.

Image non disponible

Related information

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