diff --git a/mainwindow.cpp b/mainwindow.cpp index 611a9f5..b928b7f 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -10,7 +10,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), aboutQtAct = new QAction(/*QIcon(":/pic/icon/qt-icon.png"), */tr("&关于Qt"), this); aboutAct = new QAction(/*QIcon(":/pic/icon/about.png"), */tr("&关于SerialAsst"), this); - helpMenu = menuBar->addMenu(tr("&帮助")); + helpMenu = menuBar->addMenu(tr("帮助(&H)")); helpMenu->addAction(aboutQtAct); helpMenu->addAction(aboutAct); setCentralWidget(widget); @@ -38,11 +38,19 @@ void MainWindow::setDateTime(QString datetime) void MainWindow::showAboutQt() { - QMessageBox *aboutWindow = new QMessageBox(this); - aboutWindow->aboutQt(this); + QMessageBox *aboutQtWindow = new QMessageBox(this); + aboutQtWindow->aboutQt(this); } void MainWindow::showAbout() { - + QMessageBox *aboutWindow = new QMessageBox(this); + aboutWindow->setStandardButtons(QMessageBox::Ok); + aboutWindow->setText(tr("

SerialAsst

" + "

Based on Qt 5.10.0 (MinGW 5.3.0, 32bit)

" + "Source Code: https://github.com/TurnMeOn/SerialAsst
" + "
" + "Email: TurnMeOn" + "
")); + aboutWindow->show(); }