Skip to content

Commit

Permalink
Qt/Settings: Add Cancel button to USB passthrough device dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
Z1ni committed Oct 8, 2018
1 parent feaa466 commit b0e50a1
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,13 @@ void USBDeviceAddToWhitelistDialog::InitControls()

m_whitelist_buttonbox = new QDialogButtonBox();
auto* add_button = new QPushButton(tr("Add"));
auto* close_button = new QPushButton(tr("Close"));
m_whitelist_buttonbox->addButton(add_button, QDialogButtonBox::AcceptRole);
m_whitelist_buttonbox->addButton(close_button, QDialogButtonBox::RejectRole);
connect(add_button, &QPushButton::clicked, this,
&USBDeviceAddToWhitelistDialog::AddUSBDeviceToWhitelist);
connect(close_button, &QPushButton::clicked, this,
&USBDeviceAddToWhitelistDialog::reject);
add_button->setDefault(true);

main_layout = new QVBoxLayout();
Expand Down

0 comments on commit b0e50a1

Please sign in to comment.