diff --git a/App/MainWindow.cpp b/App/MainWindow.cpp index e59f536..3c4fef3 100644 --- a/App/MainWindow.cpp +++ b/App/MainWindow.cpp @@ -491,7 +491,13 @@ void MainWindow::on_actionAbout_A_triggered() { #ifdef RABBITCOMMON CDlgAbout about(this); - about.m_AppIcon = QImage(":/image/FaceRecognizer"); + //about.m_AppIcon = QImage(":/image/FaceRecognizer"); + QIcon icon = windowIcon(); + if(icon.isNull()) return; + auto sizeList = icon.availableSizes(); + if(sizeList.isEmpty()) return; + QPixmap p = icon.pixmap(*sizeList.begin()); + about.m_AppIcon = p.toImage(); about.m_szHomePage = "https://github.com/KangLin/FaceRecognizer"; about.m_szCopyrightStartTime = "2019"; about.m_szVersionRevision = FaceRecognizer_REVISION; diff --git a/App/main.cpp b/App/main.cpp index 3936315..726248d 100644 --- a/App/main.cpp +++ b/App/main.cpp @@ -25,7 +25,8 @@ int main(int argc, char *argv[]) #if defined(Q_OS_ANDROID) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0) QtAndroid::hideSplashScreen(); #endif - QApplication app(argc, argv); + QApplication app(argc, argv); + app.setApplicationVersion(FaceRecognizer_VERSION); app.setApplicationName("FaceRecognizer"); #ifdef RABBITCOMMON