gui: Reject edit address dialog when key escape is pressed
This commit is contained in:
parent
f7a553177d
commit
4a43306a4f
1 changed files with 4 additions and 0 deletions
|
@ -39,6 +39,10 @@ EditAddressDialog::EditAddressDialog(Mode _mode, QWidget *parent) :
|
||||||
|
|
||||||
mapper = new QDataWidgetMapper(this);
|
mapper = new QDataWidgetMapper(this);
|
||||||
mapper->setSubmitPolicy(QDataWidgetMapper::ManualSubmit);
|
mapper->setSubmitPolicy(QDataWidgetMapper::ManualSubmit);
|
||||||
|
|
||||||
|
GUIUtil::ItemDelegate* delegate = new GUIUtil::ItemDelegate(mapper);
|
||||||
|
connect(delegate, &GUIUtil::ItemDelegate::keyEscapePressed, this, &EditAddressDialog::reject);
|
||||||
|
mapper->setItemDelegate(delegate);
|
||||||
}
|
}
|
||||||
|
|
||||||
EditAddressDialog::~EditAddressDialog()
|
EditAddressDialog::~EditAddressDialog()
|
||||||
|
|
Loading…
Reference in a new issue