이 페이지에서

EditorialModel QML Type

EditorialModel 유형은 사설의 모델을 제공합니다. 더 보기...

Import Statement: import QtLocation 6.12
Since: QtLocation 5.5

속성

상세 설명

EditorialModel은 Place 와 관련된 사설을 가져오는 데 사용되는 읽기 전용 모델입니다. EditorialModel::place 를 통해 Place 를 바인딩하면 사설의 초기 가져오기가 시작됩니다. 이 모델은 사설을 점진적으로 가져오며, ListView 와 같은 뷰와 함께 사용하도록 설계되었습니다. 뷰가 모델에 현재 포함된 사설 중 마지막 사설에 도달하면, 사용 가능한 사설이 더 있을 경우 이를 가져오기 위해 데이터 가져오기가 수행됩니다. 사설이 수신됨에 따라 뷰는 자동으로 업데이트됩니다. 한 번에 가져오는 사설의 수는 batchSize 속성으로 지정됩니다. 사용 가능한 사설의 총 개수는 totalCount 속성을 통해 확인할 수 있습니다.

이 모델은 다음 역할에 대한 데이터를 반환합니다:

역할유형설명
suppliersupplier콘텐츠의 공급자입니다.
사용자user콘텐츠를 제공한 사용자.
출처 표기문자열콘텐츠를 표시할 때 반드시 표시되어야 하는 출처 표기 텍스트.
URLurl이미지의 URL입니다.
imageId문자열이미지의 식별자입니다.
mimeType문자열이미지의 MIME 유형입니다.
text문자열해당 장소에 대한 편집팀의 텍스트 설명입니다. 제공자에 따라 리치 텍스트(HTML 기반) 또는 일반 텍스트일 수 있습니다.
title문자열편집 기사의 제목입니다.
language문자열사설이 작성된 언어.
dateTimedatetime리뷰가 게시된 날짜와 시간.
textstring해당 장소에 대한 리뷰의 텍스트 설명입니다. 제공자에 따라 리치 텍스트(HTML 기반) 또는 일반 텍스트일 수 있습니다.
language문자열리뷰가 작성된 언어입니다.
평점실수리뷰 작성자가 해당 장소에 부여한 평점.
reviewId문자열리뷰의 식별자입니다.
title문자열리뷰의 제목입니다.

예시

다음 예제는 특정 장소에 대한 사설을 표시하는 방법을 보여줍니다:

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
            }
        }
    }
}

속성 문서

batchSize : int

이 속성은 추가 사설 항목을 가져올 때 사용할 배치 크기를 저장합니다.

place : Place

이 속성은 사설이 대상이 되는 ‘장소’를 나타냅니다.

totalCount : int

이 속성은 해당 장소에 대한 편집 항목의 총 개수를 나타냅니다.

© 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.