grayfox
27th June 2011, 15:22
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
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
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
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