mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-04 09:41:52 +01:00
gui: Add close window shortcut
CMD+W/CTRL+W is the standard shortcut to close a window without exiting the program.
This commit is contained in:
@@ -54,6 +54,7 @@
|
||||
#include <QSettings>
|
||||
#include <QSize>
|
||||
#include <QString>
|
||||
#include <QShortcut>
|
||||
#include <QTextDocument> // for Qt::mightBeRichText
|
||||
#include <QThread>
|
||||
#include <QUrlQuery>
|
||||
@@ -378,6 +379,11 @@ void bringToFront(QWidget* w)
|
||||
}
|
||||
}
|
||||
|
||||
void handleCloseWindowShortcut(QWidget* w)
|
||||
{
|
||||
QObject::connect(new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_W), w), &QShortcut::activated, w, &QWidget::close);
|
||||
}
|
||||
|
||||
void openDebugLogfile()
|
||||
{
|
||||
fs::path pathDebug = GetDataDir() / "debug.log";
|
||||
|
||||
Reference in New Issue
Block a user