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

RowLayout QML Type

Identical to GridLayout, but having only one row.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

RowLayout QML Type

  • Import Statement: import QtQuick.Layouts 1.13

  • Inherited By:: KeyboardRow

  • Inherits: Item

  • Group: RowLayout is part of layouts

Detailed Description

It is available as a convenience for developers, as it offers a cleaner API.

Items in a RowLayout support these attached properties:

Image non disponible
 
Sélectionnez
RowLayout {
    id: layout
    anchors.fill: parent
    spacing: 6
    Rectangle {
        color: 'teal'
        Layout.fillWidth: true
        Layout.minimumWidth: 50
        Layout.preferredWidth: 100
        Layout.maximumWidth: 300
        Layout.minimumHeight: 150
        Text {
            anchors.centerIn: parent
            text: parent.width + 'x' + parent.height
        }
    }
    Rectangle {
        color: 'plum'
        Layout.fillWidth: true
        Layout.minimumWidth: 100
        Layout.preferredWidth: 200
        Layout.preferredHeight: 100
        Text {
            anchors.centerIn: parent
            text: parent.width + 'x' + parent.height
        }
    }
}

Read more about attached properties here.

See Also

Property Documentation

 

[since QtQuick.Layouts 1.1] layoutDirection : enumeration

This property holds the layout direction of the row layout - it controls whether items are laid out from left ro right or right to left. If Qt.RightToLeft is specified, left-aligned items will be right-aligned and right-aligned items will be left-aligned.

Possible values:

  • Qt.LeftToRight (default) - Items are laid out from left to right.

  • Qt.RightToLeft - Items are laid out from right to left

This property was introduced in QtQuick.Layouts 1.1.

See Also

spacing : real

This property holds the spacing between each cell. The default value is 5.

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