[Qt-interest] Images not showing in application

Paul Miller paul at fxtech.com
Mon May 2 15:01:04 CEST 2011


On 5/1/2011 5:13 AM, Robert Wood wrote:
> 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".
>
> I could understand that maybe I needed to copy images to the directory
> the executable is in for the instance where it works in the debugger and
> not when the program's copied to a different machine, but not when it
> doesn't even run in the debugger!

Are some of your resources JPEGs and have you forgotten to bundle the 
JPEG image plugin with your application?

I'd still recommend using a compiled resource file though. It cuts down 
on the number of dependencies your binary has.




More information about the Qt-interest-old mailing list