Qt/Input: disable TabFocus while mapping buttons in order to map Tab key

This commit is contained in:
Unknown 2017-11-29 10:21:46 +01:00 committed by Ivan
parent dd4ccb059e
commit 2cd551a222

View File

@ -278,6 +278,11 @@ void pad_settings_dialog::ReactivateButtons()
m_button_id = button_ids::id_pad_begin;
UpdateLabel();
SwitchButtons(true);
for (auto but : m_padButtons->buttons())
{
but->setFocusPolicy(Qt::StrongFocus);
}
}
void pad_settings_dialog::RepaintPreviewLabel(QLabel* l, int dz, int w, int x, int y)
@ -405,6 +410,11 @@ void pad_settings_dialog::OnPadButtonClicked(int id)
break;
}
for (auto but : m_padButtons->buttons())
{
but->setFocusPolicy(Qt::ClickFocus);
}
m_button_id = id;
m_padButtons->button(m_button_id)->setText(tr("[ Waiting %1 ]").arg(MAX_SECONDS));
m_padButtons->button(m_button_id)->setPalette(QPalette(Qt::blue));