Qt6设置系统托盘程序
2023-1-4
| 2023-6-27
字数 260阅读时长 1 分钟
type
Post
status
Published
date
Jan 4, 2023
slug
Qt6设置系统托盘程序
summary
Qt6设置系统托盘程序(QSystemTrayIcon)
tags
C++
QT
category
C++
icon
password
Property
Jun 27, 2023 06:32 AM
要写一个可以隐藏到托盘的Qt界面程序可以分三步:
1、在mainwindow.cpp中添加头文件:
2、挑选一个顺眼的icon,添加到qrc中,比如笔者选择了:/icon/办公软件.png
3、把以下代码粘贴到mainwindow.cpp的构造函数中,把icon换成自己的,大功告成~
  • C++
  • QT
  • RUST-如何读取yaml文件nginx设置Alist域名及https域名证书
    Loading...
    目录