Commit c8540099 authored by yoann's avatar yoann
Browse files

* QT prefs: escape key closes the dialog

parent c6e9c5ac
......@@ -37,6 +37,7 @@
#include <QCheckBox>
#include <QScrollArea>
#include <QMessageBox>
#include <QKeyEvent>
PrefsDialog *PrefsDialog::instance = NULL;
......@@ -268,3 +269,11 @@ void PrefsDialog::reset()
config_SaveConfigFile( p_intf, NULL );
}
}
void PrefsDialog::keyPressEvent( QKeyEvent *e )
{
if( e->key() == Qt::Key_Escape )
{
cancel();
}
}
......@@ -79,13 +79,14 @@ private:
static PrefsDialog *instance;
private slots:
void changePanel( QTreeWidgetItem *);
void changeSimplePanel( QListWidgetItem *);
void changePanel( QTreeWidgetItem * );
void changeSimplePanel( QListWidgetItem * );
void setAll();
void setSmall();
void save();
void cancel();
void reset();
void keyPressEvent( QKeyEvent * );
};
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment