mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-10 14:39:01 +01:00
Qt/Settings: Add Cancel button to USB passthrough device dialog
This commit is contained in:
parent
feaa466edc
commit
b27c688fdf
@ -48,9 +48,12 @@ void USBDeviceAddToWhitelistDialog::InitControls()
|
|||||||
|
|
||||||
m_whitelist_buttonbox = new QDialogButtonBox();
|
m_whitelist_buttonbox = new QDialogButtonBox();
|
||||||
auto* add_button = new QPushButton(tr("Add"));
|
auto* add_button = new QPushButton(tr("Add"));
|
||||||
|
auto* cancel_button = new QPushButton(tr("Cancel"));
|
||||||
m_whitelist_buttonbox->addButton(add_button, QDialogButtonBox::AcceptRole);
|
m_whitelist_buttonbox->addButton(add_button, QDialogButtonBox::AcceptRole);
|
||||||
|
m_whitelist_buttonbox->addButton(cancel_button, QDialogButtonBox::RejectRole);
|
||||||
connect(add_button, &QPushButton::clicked, this,
|
connect(add_button, &QPushButton::clicked, this,
|
||||||
&USBDeviceAddToWhitelistDialog::AddUSBDeviceToWhitelist);
|
&USBDeviceAddToWhitelistDialog::AddUSBDeviceToWhitelist);
|
||||||
|
connect(cancel_button, &QPushButton::clicked, this, &USBDeviceAddToWhitelistDialog::reject);
|
||||||
add_button->setDefault(true);
|
add_button->setDefault(true);
|
||||||
|
|
||||||
main_layout = new QVBoxLayout();
|
main_layout = new QVBoxLayout();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user