Look for a close button when pressing the escape key.

This commit is contained in:
Felix Geyer 2015-05-03 19:59:11 +02:00
parent f3d956ceed
commit 6c9c0fd5c5

View File

@ -46,8 +46,10 @@ void DialogyWidget::keyPressEvent(QKeyEvent* e)
break;
case Qt::Key_Escape:
if (!clickButton(QDialogButtonBox::Cancel)) {
if (!clickButton(QDialogButtonBox::Close)) {
e->ignore();
}
}
break;
default:
e->ignore();