How to publish and modify the application icon of the QT creator Application

Source: Internet
Author: User

I, QT application release
First, you need to compile the application in release mode and copy the compiled program file to the release folder.

Copy the following dynamic link library to the release Folder: mingwm10.dll, qtcore4.dll, qtgui4.dll, libgcc_s_dw2-1.dll. You can find them under "QT installation directory \ QT \ bin.
If other functions, such as OpenGL, are used, copy qtopengl4.dll to the release folder.
If the application has the function of accessing the database, you must not only copy qtsql4.dll to the release folder, but also copy the corresponding database Driver (also DLL, put it under the "Publish Folder \ sqldrivers" directory. You can find them from the "QT installation directory \ QT \ plugins \ sqldrivers", such as qsqlite4.dll.
If the application contains Chinese characters, you also need to create the codecs directory under the release folder and copy the qcncodecs4.dll under the "QT installation directory \ QT \ plugins \ codecs" directory.

For other functions provided in Plug-In mode, such as imageformats, you also need to copy all required DLL files in the above way.

2. Application (exe file) icon settings

Step 1:

First of all, you must prepare a. ICO icon file (Suppose it is qtdemo. ico) and copy it to the project directory (the directory where the. Pro file is located ).

Step 2:
In QT creator, CTRL + N or file-new file or project, select text file in general, and enter the name as the. RC file (such as qtdemo. Rc). Write only one line in it:
Idi_icon1 icon discardable "myicon. ICO"

Step 3:

Edit the. Pro file, which should include:
Other_files + = \ qtdemo. RC
Add another row under it (if there is no content above ):
Rc_file = \
Qtdemo. RC

Step 4:

Re-compile. All done!

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.