# HG changeset patch # User Matti Hamalainen # Date 1490888269 -10800 # Node ID d40345d6373318c45bea1978710fa134a655ffdc # Parent 8765397e45f44fb9fc3b5109c0ce579b4623af2d Implement some keyboard shortcuts. diff -r 8765397e45f4 -r d40345d63733 main.cpp --- a/main.cpp Thu Mar 30 18:15:09 2017 +0300 +++ b/main.cpp Thu Mar 30 18:37:49 2017 +0300 @@ -198,6 +198,10 @@ ui->tableview_Latest->horizontalHeader()->setSectionResizeMode(QHeaderView::Stretch); setActivePerson(-1); + + // Keyboard shortcuts + sc_quit = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q), this, SLOT(close())); + sc_esc = new QShortcut(QKeySequence(Qt::Key_Escape), this, SLOT(on_button_ClearFilter_clicked())); } diff -r 8765397e45f4 -r d40345d63733 main.h --- a/main.h Thu Mar 30 18:15:09 2017 +0300 +++ b/main.h Thu Mar 30 18:37:49 2017 +0300 @@ -7,6 +7,7 @@ #define MAINWINDOW_H #include +#include #include #include #include @@ -148,6 +149,8 @@ int peopleSortIndex; Qt::SortOrder peopleSortOrder; QString peopleFilter; + + QShortcut *sc_quit, *sc_esc; };