Qt: add tooltip to MappingBool
Tooltip code is identical to MappingDouble and the tooltips (UI description) are present in the underlying setting object.
This commit is contained in:
parent
26f6648421
commit
f3ffac0058
|
@ -75,6 +75,9 @@ void MappingDouble::Update()
|
|||
MappingBool::MappingBool(MappingWidget* parent, ControllerEmu::NumericSetting<bool>* setting)
|
||||
: QCheckBox(parent), m_setting(*setting)
|
||||
{
|
||||
if (const auto ui_description = m_setting.GetUIDescription())
|
||||
setToolTip(tr(ui_description));
|
||||
|
||||
connect(this, &QCheckBox::stateChanged, this, [this, parent](int value) {
|
||||
m_setting.SetValue(value != 0);
|
||||
ConfigChanged();
|
||||
|
|
Loading…
Reference in New Issue