user QML Value Type
Le type d'utilisateur identifie un utilisateur ayant contribué à un élément de contenu spécifique d'Place. En savoir plus...
| Import Statement: | import QtLocation 6.12 |
| Since: | QtLocation 5.5 |
Propriétés
Description détaillée
Chaque élément de contenu de type « Place » est associé à un utilisateur qui a fourni ce contenu. Ce type fournit des informations sur cet utilisateur.
Exemple
L'exemple suivant montre comment afficher des informations sur l'utilisateur qui a soumis un article :
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
}
}
}
}Voir également ImageModel, ReviewModel et EditorialModel.
Documentation sur les propriétés
name : string
Cette propriété contient le nom d'un utilisateur.
userId : string
Cette propriété contient l'identifiant unique de l'utilisateur.
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.