Icons from resource file not shown when linking to Qt statically
I have a main window with a toolbar that has some tool buttons on it.
The resource file has just 1 icon and is used as the main window's icon, and tool button's icon.
The code looks like this
Code:
setWindowIcon
(QIcon(":/my/app.ico"));
toolbar
->addAction
(QIcon(":/my/app.ico"),
"About");
I also had called Q_INIT_RESOURCE in the main.
Everything work fine when linking with Qt dynamically, however the icon won't display in both places when linking with Qt statically.
Please let me know what did I do wrong
Re: Icons from resource file not shown when linking to Qt statically
Have you got the ICO image format plugin built in?
Re: Icons from resource file not shown when linking to Qt statically
I am not sure what you are talking about, I can found "qico.lib" under qt_root\plugins\imageformats\, you mean I should link to this lib as well?
Or you mean I have to explicitly specify this lib when building qt statically?
Re: Icons from resource file not shown when linking to Qt statically