[Qt-interest] Images not showing in application
Bo Thorsen
bo at fioniasoftware.dk
Mon May 2 09:15:49 CEST 2011
Den 01-05-2011 12:13, Robert Wood skrev:
> I have a problem when inserting images into an application in that when
> I run the application they don't show.
>
> In the case of one program, the image shows in Designer, but doesn't
> show whether running from Creator or as a stand-alone executable. In the
> case of the other, it shows when running in Creator, but not as a
> stand-alone app.
>
> I am inserting the images in QLabel objects and doing it as a "Choose
> File", not "Choose Resource".
Depending on how your sources are structured, you might have to add a
Q_INIT_RESOURCE(resourcename);
It should be placed after the QApplication instantiation but before you
use the resource.
The name of it comes from the filename: "resourcename.qrc".
Bo Thorsen,
Fionia Software.
--
Expert Qt and C++ developer for hire
Contact me if you need expert Qt help
http://www.fioniasoftware.dk
More information about the Qt-interest-old
mailing list