mirror of
https://github.com/MultiMC/MultiMC5.git
synced 2024-11-20 08:10:11 +00:00
Add a quit shortcut to the main window (#200)
The shortcut is Ctrl+Q on every platform but windows, which doesn have one. See also: http://qt-project.org/doc/qt-5/qkeysequence.html#details (StandardKey Quit)
This commit is contained in:
parent
c9465e9e86
commit
adecc53df8
@ -35,6 +35,7 @@
|
||||
#include <QToolButton>
|
||||
#include <QWidgetAction>
|
||||
#include <QProgressDialog>
|
||||
#include <QShortcut>
|
||||
|
||||
#include "osutils.h"
|
||||
#include "userutils.h"
|
||||
@ -116,6 +117,12 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWi
|
||||
// OSX magic.
|
||||
// setUnifiedTitleAndToolBarOnMac(true);
|
||||
|
||||
// Global shortcuts
|
||||
{
|
||||
auto q = new QShortcut(QKeySequence::Quit, this);
|
||||
connect(q, &QShortcut::activated, qApp, &QCoreApplication::quit);
|
||||
}
|
||||
|
||||
// The instance action toolbar customizations
|
||||
{
|
||||
// disabled until we have an instance selected
|
||||
|
Loading…
Reference in New Issue
Block a user