Add CTRL+P as a hotkey to open settings dialog

This commit is contained in:
Rasmus Karlsson 2017-05-27 15:40:42 +02:00
parent 0b2b6a0dc7
commit 909154bd8b

View file

@ -3,9 +3,11 @@
#include "settingsmanager.h"
#include "widgets/chatwidget.h"
#include "widgets/notebook.h"
#include "widgets/settingsdialog.h"
#include <QDebug>
#include <QPalette>
#include <QShortcut>
#include <QVBoxLayout>
#include <boost/foreach.hpp>
@ -44,6 +46,15 @@ MainWindow::MainWindow(QWidget *parent)
setPalette(palette);
resize(1280, 800);
// Initialize program-wide hotkeys
{
// CTRL+P: Open Settings Dialog
auto shortcut = new QShortcut(QKeySequence("CTRL+P"), this);
connect(shortcut, &QShortcut::activated, []() {
SettingsDialog::showDialog(); //
});
}
}
MainWindow::~MainWindow()