QtDialog: Set Ctrl+Q as the shortcut for quitting the program.
QKeySequence::Quit does not work on all platforms, and since it translates to Ctrl+Q on all platforms where it does work, Ctrl+Q was hardcoded instead.
This commit is contained in:
parent
0a6543d957
commit
56e0499104
|
@ -26,6 +26,7 @@
|
||||||
#include <QMimeData>
|
#include <QMimeData>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
#include <QShortcut>
|
#include <QShortcut>
|
||||||
|
#include <QKeySequence>
|
||||||
#include <QMacInstallDialog.h>
|
#include <QMacInstallDialog.h>
|
||||||
|
|
||||||
#include "QCMake.h"
|
#include "QCMake.h"
|
||||||
|
@ -99,6 +100,7 @@ CMakeSetupDialog::CMakeSetupDialog()
|
||||||
QObject::connect(this->DeleteCacheAction, SIGNAL(triggered(bool)),
|
QObject::connect(this->DeleteCacheAction, SIGNAL(triggered(bool)),
|
||||||
this, SLOT(doDeleteCache()));
|
this, SLOT(doDeleteCache()));
|
||||||
this->ExitAction = FileMenu->addAction(tr("E&xit"));
|
this->ExitAction = FileMenu->addAction(tr("E&xit"));
|
||||||
|
this->ExitAction->setShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q));
|
||||||
QObject::connect(this->ExitAction, SIGNAL(triggered(bool)),
|
QObject::connect(this->ExitAction, SIGNAL(triggered(bool)),
|
||||||
this, SLOT(close()));
|
this, SLOT(close()));
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue