5

QT设置窗口图标_五个板栗的技术博客_51CTO博客

 1 year ago
source link: https://blog.51cto.com/u_15515702/5805199
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

QT设置窗口图标

精选 原创

五个板栗 2022-10-28 17:27:15 博主文章分类:Qt ©著作权

文章标签 ico git 文件名 qt 窗口图标 文章分类 C/C++ 编程语言 yyds干货盘点 阅读数140

  1. 点击项目,添加新文件
  2. 选择Qt,选择qt resource file
QT设置窗口图标_qt
  1. 点击choose,填写Filename文件名
QT设置窗口图标_ico_02
  1. 点击下一步,添加到项目,添加到版本控制系统Git,点击完成
QT设置窗口图标_窗口图标_03
  1. 添加前缀Add Prefix
QT设置窗口图标_ico_04
  1. 点击添加Add Files,图标选择以.ico为后缀的文件
QT设置窗口图标_git_05
  1. 点击完成,复制资源路径,在main.cpp文件中w.setwindowIcon(Qicon(“:/new/prefix1”));
  2. 默认的窗口图标就转变成了你设置的图标

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK