contactDetail QML Value Type
contactDetailタイプは、電話番号やウェブサイトのアドレスなどの連絡先の詳細を保持します。詳細...
Import Statement: | import QtLocation 6.8 |
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 で宣言的に連絡先の詳細を指定することはできません。
プロパティ Documentation
label : string |
このプロパティは連絡先の詳細を記述するラベルを保持します。
このラベルはローカライズされる可能性があります。言語は設定するエンティティに依存し、通常はPlugin となります。Plugin::locales プロパティは、使用する言語を定義します。
value : string |
このプロパティは、電話番号、電子メールアドレス、ウェブサイトのURLなどの連絡先詳細の値を保持します。
© 2025 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.