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

user QML Value Type

The user type identifies a user who contributed a particular Place content item.

This type was introduced in QtLocation 5.5.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

user QML Value Type

  • Import Statement: import QtLocation 6.5

  • Since:: QtLocation 5.5

  • Group: user is part of qml-QtLocation5-places, qml-QtLocation5-places-data

I. Detailed Description

Each Place content item has an associated user who contributed the content. This type provides information about that user.

I-1. Example

The following example shows how to display information about the user who submitted an editorial:

 
Sélectionnez
import QtQuick
import QtPositioning
import QtLocation

EditorialModel {
    id: editorialModel
    batchSize: 3
    place: place
}

ListView {
    model: editorialModel
    delegate: Item {
        anchors.fill: parent

        Column {
            width: parent.width
            clip: true

            Text {
                text: title
                width: parent.width
                wrapMode: Text.WordWrap
                font.pixelSize: 24
            }

            Text {
                text: text
                width: parent.width
                wrapMode: Text.WordWrap
                font.pixelSize: 20
            }

            Row {
                Image {
                    width: 16
                    height: 16

                    source: supplier.icon.url(Qt.size(width, height), Icon.List)
                }

                Text {
                    text: "Provided by " + supplier.name
                    font.pixelSize: 16
                }
            }

            Text {
                text: "Contributed by " + user.name
                font.pixelSize: 16
            }

            Text {
                text: attribution
                font.pixelSize: 8
            }
        }
    }
}

I-2. See Also

II. Property Documentation

 

II-1. userId : string

This property holds the unique identifier of the user.

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