diff --git a/src/widget/widget.cpp b/src/widget/widget.cpp index ce1061f79..00a22af62 100644 --- a/src/widget/widget.cpp +++ b/src/widget/widget.cpp @@ -50,6 +50,7 @@ #include #include #include +#include #include #include #include @@ -197,6 +198,9 @@ void Widget::init() connect(timer, &QTimer::timeout, this, &Widget::onTryCreateTrayIcon); connect(offlineMsgTimer, &QTimer::timeout, this, &Widget::processOfflineMsgs); + // keyboard shortcuts + new QShortcut(Qt::CTRL + Qt::Key_Q, this, SLOT(close())); + addFriendForm->show(*ui); connect(settingsWidget, &SettingsWidget::groupchatPositionToggled, contactListWidget, &FriendListWidget::onGroupchatPositionChanged);