From 7ac6677b2ddc6ecfa01880ac9fd5f57d5070e021 Mon Sep 17 00:00:00 2001 From: momen Date: Wed, 2 Jul 2025 11:20:12 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E4=BB=BB=E5=8A=A1?= =?UTF-8?q?=E6=A0=8F=E6=B2=A1=E6=9C=89=E6=AD=A3=E7=A1=AE=E6=98=BE=E7=A4=BA?= =?UTF-8?q?logo=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.cpp | 2 +- src/mainwindow.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index c834b96..049e23f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -57,7 +57,7 @@ int main(int argc, char *argv[]) // QGuiApplication::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough); QApplication a(argc, argv); - + QApplication::setWindowIcon(QIcon(":/resources/128*128/spark-update-tool.png")); if (!isRoot()) { qDebug() << "Not running as root. Attempting to elevate..."; if (!elevateToRoot()) { diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index a94fedd..e54ce43 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -13,7 +13,7 @@ MainWindow::MainWindow(QWidget *parent) , m_model(new AppListModel(this)) , m_delegate(new AppDelegate(this)) { - QIcon icon(":/resources/spark-update-tool.svg"); + QIcon icon(":/resources/128*128/spark-update-tool.png"); setWindowIcon(icon); QProgressDialog *progressDialog = new QProgressDialog("正在与服务器通信,获取更新信息中...", QString(), 0, 0, this); progressDialog->setWindowModality(Qt::ApplicationModal); @@ -29,7 +29,7 @@ MainWindow::MainWindow(QWidget *parent) progressDialog->deleteLater(); watcher->deleteLater(); ui->setupUi(this); - QIcon icon(":/resources/spark-update-tool.svg"); + QIcon icon(":/resources/128*128/spark-update-tool.png"); setWindowIcon(icon); // 创建 QListView 并设置父控件为 ui->appWidget listView = new QListView(ui->appWidget);