From 97a30114d39d630ff019d4656fab152871bba5bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8D=E6=98=8E=E6=B4=8B?= Date: Sat, 10 Feb 2018 21:30:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=B3=E4=BA=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mainwindow.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) 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(); }