i have a annoying issue with showing jpg images with qt. I devlope with Visual Studio 2008 in Windows 7 and using the Qt version 4.8.2. I will now describe my problem by means of the "collidingmice" example deliverd with Qt (../examples/graphicsview/collidingmice).
I can build this example via Visual Studio IDE or with via the Visual Studio command prompt. In this example a jpg is used as background and is correctly shown when I execute the debug executable. But in release build this background jpg is not shown.
I already realized, that Qt uses plugins for loading/showing different images. Therefore I copied the contents of the plugin folder of Qt into the application directory (where collidingmice.exe is). Unfortunatly, this does not solve the problem.
Hence, I thought there must be something wrong with the Qt build and the jpeg library. Therefore, I reconfigured Qt by executing the following commands in the Visual Studio command prompt:
nmake distclean
configure -debug-and-release -opensource -platform win32-msvc2008 -qt-libjpeg -no-webkit
nmake
After that did a rebuild of the example, but again the jpg image is not shown. I am not sure what the problem is since it works in debug build and in release I think I only have to deliver the needed plugin DLLs. But obviously I am not right.
I hope anyone can help me or can give me some hints where the problem might be. Thanks!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…