Tag Archives: QT learning column

[Solved] QT Icon Set Error: error: [release/helloworld_resource_res.o] Error 1

When learning QT setting icons for beginners, errors are reported during compilation. The following two error correction methods and correct correction methods are shared.

Error operation 1: modify the suffix of JPG file to .ico

Error operation 2: save as using PS and other tools on BMP format and then modify the suffix to .ico format

Correct operation: generate transparent ICO icons online through ICO, and then import them

Tips: the default size of qtball is 32 * 32, and the menu is 16 * 16

If the icon size is larger than the default size, QT will automatically reduce the size; If the icon size is smaller than the default size, QT will not operate.

.ico files need to be placed in the project resource directory.

Compiled, as shown below.