qt - How to access files specified in a .qrc file from the c++ code? -
i created .qrc file in qt 5.0.1:
<rcc> <qresource> <file>105.ico</file> </qresource> </rcc>
and edited .pro file:
resources += \ icons.qrc
when use code below in class constructor icon doesn't appear
this->setwindowicon(qicon(":105.ico"));
but when give local file address instead of ":105.ico" icon shows up. problem?
it should be:
this->setwindowicon(qicon(":/105.ico"));
(note slash)
Comments
Post a Comment