mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Make most of the shortcuts widget specific
Having the window specific means that you can't have a key do different things on different widgets. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
2cfa7fead0
commit
49053e86aa
3 changed files with 8 additions and 6 deletions
|
@ -502,11 +502,11 @@ void MainWindow::on_actionYearlyStatistics_triggered()
|
|||
yearlyStats->setMinimumWidth(600);
|
||||
yearlyStats->setWindowTitle(tr("Yearly Statistics"));
|
||||
yearlyStats->setWindowIcon(QIcon(":subsurface-icon"));
|
||||
QShortcut *closeKey = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_W), yearlyStats);
|
||||
QShortcut *closeKey = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_W), yearlyStats, 0, 0, Qt::WidgetShortcut);
|
||||
connect(closeKey, SIGNAL(activated()), yearlyStats, SLOT(close()));
|
||||
closeKey = new QShortcut(QKeySequence(Qt::Key_Escape), yearlyStats);
|
||||
closeKey = new QShortcut(QKeySequence(Qt::Key_Escape), yearlyStats, 0, 0, Qt::WidgetShortcut);
|
||||
connect(closeKey, SIGNAL(activated()), yearlyStats, SLOT(close()));
|
||||
QShortcut *quitKey = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q), yearlyStats);
|
||||
QShortcut *quitKey = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_Q), yearlyStats, 0, 0, Qt::WidgetShortcut);
|
||||
connect(quitKey, SIGNAL(activated()), this, SLOT(close()));
|
||||
}
|
||||
/* problem here is that without more MainWindow variables or a separate YearlyStatistics
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue