RadioButton QML Type

オン/オフ切り替え可能な専用ラジオボタン。もっと見る...

Import Statement: import QtQuick.Controls
Inherits:

AbstractButton

詳細説明

RadioButtonは、オン(チェック)またはオフ(チェックなし)に切り替えることができるオプションボタンを提示します。ラジオボタンは通常、一連のオプションから 1 つのオプションを選択するために使用されます。

RadioButton はその API をAbstractButton から継承しています。例えば、text を設定し、AbstractButton API を使用してclicks に反応することができます。ラジオボタンの状態は、checked プロパティで設定できます。

ラジオボタンはデフォルトでauto-exclusive 。同じ親アイテムに属するラジオボタンの中で、いつでもチェックできるボタンは1つだけです。共通の親を持たないラジオボタンの場合、ButtonGroup を使って排他性を管理することができます。

RadioDelegate は、通常ビューで使用されることを除けば、RadioButtonに似ています。

ColumnLayout {
    RadioButton {
        checked: true
        text: qsTr("First")
    }
    RadioButton {
        text: qsTr("Second")
    }
    RadioButton {
        text: qsTr("Third")
    }
}

ButtonGroupラジオボタンのカスタマイズボタンコントロールRadioDelegateも参照して ください。

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