QT Settings app icon and executable program icon (also Setwindowtitle and Setwindowicon)

Source: Internet
Author: User

First, prepare an ICO icon. Example: Myappico.ico
Create a new file with Notepad
Write a line in it:
Idi_icon1 ICON discardable "/images/myappico.ico"

Save the renamed Myapp.rc file and put it in your QT project directory.

Create a new images folder in the project directory and your icon Myappico.ico (only in ICO format) in the Images folder under the project directory

Open your QT project file with Notepad (such as "Myapp.pro") and add a new 2 lines to it:

Other_files + = Myapp.rc

Rc_file + = Myapp.rc

Save, compile your project, hehe. It's a success.

In addition, Setwindowtitle (tr ("Picture browser"));//Executable title

Setwindowicon (Qicon (":/icons/qt-logo.png"));//executable icon

http://blog.csdn.net/liuguangzhou123/article/details/7359904

QT Settings app icon and executable program icon (also Setwindowtitle and Setwindowicon)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.