RadioDelegate QML Type
オン/オフ切り替え可能なラジオインジケータを持つ排他的アイテムデリゲート。詳細...
Import Statement: | import QtQuick.Controls |
Inherits: |
詳細説明
RadioDelegateは、オン(チェック)またはオフ(チェックなし)を切り替えることができる項目デリゲートを提示します。RadioDelegateは、通常、一連のオプションから1つのオプションを選択するために使用されます。
RadioDelegate は、その API をItemDelegate から継承し、AbstractButton からも継承しています。例えば、text を設定し、AbstractButton API を使ってclicks に反応することができます。ラジオ・デリゲートの状態は、checked プロパティで設定できます。
ラジオ・デリゲートはデフォルトでauto-exclusive です。同じ親アイテムに属する無線デリゲートのうち、いつでもチェックできるデリゲートは 1 つだけです。別のデリゲートをチェックすると、前にチェックしたデリゲートのチェックは自動的に解除されます。共通の親を持たないラジオデリゲートについては、ButtonGroup を使って排他性を管理することができます。
RadioButton ラジオデリゲートはRadioDelegateと似ていますが、ビューで使われることはあまりなく、選択肢が少ない場合に使われます。
ButtonGroup { id: buttonGroup } ListView { model: ["Option 1", "Option 2", "Option 3"] delegate: RadioDelegate { text: modelData checked: index == 0 ButtonGroup.group: buttonGroup } }
RadioDelegate,Delegate Controls,RadioButtonのカスタマイズも参照してください 。
© 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.