From 4bb4d5e5a912aed1607efdb66851f6025a5417d7 Mon Sep 17 00:00:00 2001 From: Martchus Date: Sun, 20 Aug 2023 14:16:26 +0200 Subject: [PATCH] Add "About Qt" dialog This is useful to see which version of Qt is currently used. --- src/QtWindow.cpp | 10 +++++++--- src/QtWindow.h | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/QtWindow.cpp b/src/QtWindow.cpp index db186dc..63fdea2 100644 --- a/src/QtWindow.cpp +++ b/src/QtWindow.cpp @@ -34,6 +34,7 @@ #include #include +#include #include #include #include @@ -338,9 +339,11 @@ void QtWindow::createActions() m_exitAct->setToolTip(tr("Exit the application")); connect(m_exitAct, SIGNAL(triggered()), this, SLOT(close())); - m_aboutAct = new QAction(QIcon::fromTheme(QStringLiteral("help-about-symbolic")), tr("&About"), this); - m_aboutAct->setToolTip(tr("Show the application's About box")); - connect(m_aboutAct, SIGNAL(triggered()), this, SLOT(about())); + m_aboutAct = new QAction(QIcon::fromTheme(QStringLiteral("help-about-symbolic")), tr("&About Piano Booster"), this); + m_aboutAct->setToolTip(tr("Show the application's about box")); + connect(m_aboutAct, &QAction::triggered, this, &QtWindow::about); + m_aboutQtAct = new QAction(QIcon::fromTheme(QStringLiteral("qtcreator")), tr("About Qt"), this); + connect(m_aboutQtAct, &QAction::triggered, this, &QApplication::aboutQt); m_shortcutAct = new QAction(QIcon::fromTheme(QStringLiteral("help-keybord-shortcuts")), tr("&PC Shortcut Keys"), this); m_shortcutAct->setToolTip(tr("The PC Keyboard shortcut keys")); @@ -485,6 +488,7 @@ void QtWindow::createMenus() m_helpMenu->addAction(m_shortcutAct); m_helpMenu->addAction(m_aboutAct); + m_helpMenu->addAction(m_aboutQtAct); } void QtWindow::openRecentFile() diff --git a/src/QtWindow.h b/src/QtWindow.h index ee2b509..18a18a2 100644 --- a/src/QtWindow.h +++ b/src/QtWindow.h @@ -204,6 +204,7 @@ private: QAction *m_openAct; QAction *m_exitAct; QAction *m_aboutAct; + QAction *m_aboutQtAct; QAction *m_shortcutAct; QAction *m_songPlayAct; QAction *m_setupMidiAct;