From 66d1aacbbe30f4d0dfd544a6360c11fb4bc87470 Mon Sep 17 00:00:00 2001 From: zty199 <46324746+zty199@users.noreply.github.com> Date: Sat, 4 Feb 2023 21:41:43 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E6=89=98=E7=9B=98=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=BC=A0=E6=A0=87=E6=82=AC=E6=B5=AE=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 鼠标悬浮在托盘图标上时,显示气泡“星火应用商店” Log: trayIcon 设置 toolTip;遗留问题:仅在后台运行时,系统监视器无法正确展示名称(仅显示 spark-store) --- src/mainwindow-dtk.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mainwindow-dtk.cpp b/src/mainwindow-dtk.cpp index 1bafa38..68bae97 100644 --- a/src/mainwindow-dtk.cpp +++ b/src/mainwindow-dtk.cpp @@ -216,8 +216,9 @@ void MainWindow::initLeftMenu() void MainWindow::initTrayIcon() { - QMenu *menu = new QMenu(this); + trayIcon->setToolTip(tr("Spark Store")); + QMenu *menu = new QMenu(this); QAction *showAction = new QAction(QObject::tr("Show MainWindow"), menu); QAction *aboutAction = new QAction(qApp->translate("TitleBarMenu", "About"), menu); QAction *exitAction = new QAction(qApp->translate("TitleBarMenu", "Exit"), menu);