SwitchDelegate QML Type
スイッチ・インジケータを持つアイテム・デリゲート。詳細...
Import Statement: | import QtQuick.Controls |
Inherits: |
プロパティ
- position : real
- visualPosition : real
詳細説明
SwitchDelegateは、オン(チェック)かオフ(チェックなし)を切り替えることができるアイテムデリゲートを提示する。スイッチデリゲートは、通常、オプションのセットから1つ以上のオプションを選択するために使用されます。より小さなオプションの集合や、 一意に識別する必要があるオプションの場合は、Switch を代わりに使うことを検討してください。
SwitchDelegate は、その API をItemDelegate から継承し、AbstractButton から継承しています。例えば、text を設定し、AbstractButton API を使ってclicks に反応することができる。スイッチ・デリゲートの状態は、checked プロパティで設定できます。
ListView { model: ["Option 1", "Option 2", "Option 3"] delegate: SwitchDelegate { text: modelData } }
SwitchDelegateおよびDelegate Controlsのカスタマイズも参照してください 。
プロパティの説明
position : real |
このプロパティは、親指インジケータの論理位置を保持する。
この位置は、インジケータのサイズに対する分数で表され、0.0
-1.0
の範囲で指定します。この位置は、例えば、親指が途中までドラッグされたかどうかを判断するために使用することができます。親指のインジケータを視覚化するには、代わりに右から左を意識したvisualPosition を使用する必要があります。
visualPositionも参照 。
visualPosition : real |
© 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.