Jasko
Jasko

Reputation: 119

Using Qt Resource for icons in a dll

I need to build a c++ dll with only one QT dialog which will have some icons. I added these icons in the Qt Creator/Qt Designer. I created a resource file and added these images to it. These icons appear in the Qt Designer, but at run time they do not show up.

There is no .pro file. So I can not add RESOURCES += myRes.qrc as suggested on some similar topics. Also Q_INIT_RESOURCE(myRes); can not be invoked.

Any ideas what to do here?

Upvotes: 1

Views: 2328

Answers (1)

Jasko
Jasko

Reputation: 119

Solved..

I was using Visual Studio 2010 to code the dll and dialog was created in the QT Creator. Resource file was created using QT Creator as well.

Solution was to add qrc file (generated using QT Creator) to the dll project in the Visual Studio. No other modifications needed to be done.

No .pro file and no Q_INIT_RESOURCE(myRes) needed to be created/invoked.

Thanks for help :)

Upvotes: 2

Related Questions