Hi, On Friday 01 November 2013 12:40:18 Graham Labdon wrote: > My project has images stored as Qt resources and I have somehow broken my > project so that they are no longer displayed in my application. If I open > the Qt Resource editor I can see them, I can also see the in QDesigner. > When I compile the project the qrc_***.cpp file gets generated > I would be grateful if someone could help me determine why the images are > not rendered in my application.
does the qrc_*.obj file get generated? Is it about as big as all the images combined? If you open the qrc_*.cpp file you should see from the generated comments which files were included. Do you find the images you expected? Check the *.qrc file, are those the same file names that you are using? E.g.: <file>hallo.png</file> --> ":/hallo.png" <file>hello/world.png</file> --> ":/hello/world.png" <file alias="foo.png">bar.png</file> --> ":/foo.png" (with the content of bar.png) If you try to open one of those files directly what happens. Insert something like this to your code: QFile testfile(":/foo.png"); if(testfile.open(QIODevice::ReadOnly)) qDebug()<<"Can open foo.png"; else qDebug()<<"foo.png missing, probably no qrc included"; testfile.close(); If this tests successful: you are probably using an image format that does not get loaded when you start the application. Check your imageformat plugins. As a last resort: use something like GammaRay to check what gets included in your program. > I am using Qt5 with Visual Studio 2012 I feel generous: I forgive you. ;-P Konrad
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest