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

Qt Quick Controls 1 Styles

The Qt Quick Controls Styles submodule provides custom styles for Qt Quick Controls.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

Qt Quick Controls 1 Styles▲

The Qt Quick Controls Styles submodule allows custom styling for Qt Quick Controls 1.

The submodule was introduced in Qt 5.1.

Getting started▲

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

 
Sélectionnez
import QtQuick.Controls.Styles 1.4

Styles▲

 

Base Style▲

The Base Style is the default style used when none is specified. It is also used as a fallback when the specified style cannot be found.

Image non disponible

Flat Style▲

The Flat Style is designed for touch devices.

Image non disponible

Selecting Styles▲

You can apply a different style to the controls by setting the QT_QUICK_CONTROLS_1_STYLE environment variable to the name of the style. For example, to use the Flat style, you can do the following:

 
Sélectionnez
QT_QUICK_CONTROLS_1_STYLE=Flat ./app

This can also be done in C++, using qputenv():

 
Sélectionnez
qputenv("QT_QUICK_CONTROLS_1_STYLE", "Flat");

Styling Views▲

Styling Controls▲

Styling Tutorials▲

Related information▲

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