contactDetail QML Value Type
contactDetailタイプは、電話番号やウェブサイトのアドレスなどの連絡先の詳細を保持します。詳細...
| Import Statement: | import QtLocation 6.11 |
| Since: | QtLocation 5.5 |
プロパティ
詳細な説明
contactDetailは、Place 。contactDetailは、label 、連絡方法を説明するローカライズされた文字列と、value 、実際の連絡先の詳細を表す文字列から構成される。
例
次の例は、JavaScriptで1つの場所に1つの電話番号を割り当てる方法を示しています:
function writeSingle() { var phoneNumber = Qt.createQmlObject('import QtLocation; ContactDetail {}', place); phoneNumber.label = "Phone"; phoneNumber.value = "555-5555" place.contactDetails.phone = phoneNumber; }
次の例は、JavaScriptで1つの場所に複数の電話番号を割り当てる方法を示しています:
function writeMultiple() { var bob = Qt.createQmlObject('import QtLocation; ContactDetail {}', place); bob.label = "Bob"; bob.value = "555-5555" var alice = Qt.createQmlObject('import QtLocation; ContactDetail {}', place); alice.label = "Alice"; alice.value = "555-8745" var numbers = new Array(); numbers.push(bob); numbers.push(alice); place.contactDetails.phone = numbers; }
QQmlPropertyMap の制限により、QML で宣言的に連絡先の詳細を指定することはできません。
プロパティのドキュメント
label : string
このプロパティは、連絡先の詳細を説明するラベルを保持します。
ラベルはローカライズされる可能性がある。言語は、それを設定するエンティティに依存します。通常、これはPlugin です。Plugin::locales プロパティは、使用される言語を定義します。
value : string
このプロパティは、電話番号、電子メールアドレス、ウェブサイトのURLなど、連絡先の詳細の値を保持します。
© 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.