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.
Read More:
- [Solved] Qt Error: qt.network.ssl: QSslSocket::connectToHostEncrypted: TLS initialization failed
- ERROR ITMS-90022: “Missing required icon file. [How to Solve]
- [Solved] QT error: the packaged exe of Enigma virtual box reports an error cannot load library qt5core.dll
- QT Creator Error while building deploying project
- [Solved] Qt UpdateLayeredWindowIndirect failed for ptDst Error
- QT calls the API of ffmpeg error [How to Solve]
- QT Error: Failed to create vertex shader [Three Methods to Fix]
- QT error: – LGL not found [How to Solve]
- PCL 1.8.1 VTK 9.0 QT 5.14.9 [How to Solve]
- Qt Error: Debug Assertion Failed [How to Solve]
- QT Error: use of undeclared identifier [How to Solve]
- [Solved] Qt Error: undefined reference to xxxxx
- [Solved] Toad Set Error: The following files specified on the Executables tab could not be found:TNS Ping
- [Solved] QT Warning: Slots named on_foo_bar are error prone
- How to Solve QT and PCIe interactive loading setupapi.H error
- How to Solev QT compilation error “cannot find – LGL”
- [Solved] QT error: error: undefined reference to ` VTable`
- Qt5core.pdb is not loaded [How to Solve]
- VS Open the UI file of QT Crash and Report Error [How to Solve]
- How to Solve QT error: LNK1158: Cannot Run “rc.exe”