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

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -