Actually here is a quote from the documentation:
First, put a single line of text to myapp.rc file:
IDI_ICON1 ICON DISCARDABLE "myappico.ico"
maybe I misunderstand the expression single line
, but the .rc
file containing this single line gives an error
Start tag exepted
Placing the same expression between the lines
<!DOCTYPE RCC> <RCC version="1.0"> IDI_ICON1 ICON DISCARDABLE "icon.ico" </RCC>
Also gives an error:
Unexpected text
So where should I insert this line to change the icon?
UPD: my working resource file is:
<!DOCTYPE RCC> <RCC version="1.0"> <qresource prefix="/"> ... <file>qml/main.qml</file> ... </qresource> </RCC>
And attempts to insert a string into it also failed with the same errors.
UPD: And this is how I add rc
to the project:
set(RESOURCES resources/resources.qrc resources/proj.rc ) qt5_add_resources (QRC_SOURCES ${RESOURCES}) ... add_executable( proj_name ... ${QRC_SOURCES} ...)
and just tried a new projname.rc
there to add.