Chris2oph
4th April 2014, 15:34
Hi
I am working on a linux Virtual Machine on Windows 8.
I have a UI which displays various different images, I have modified one of these image resources however when I run the program, the original image is still used. I have tried removing every single image from the folder that QT uses to load them from, in the hopes that this would at least stop any image being loaded, however once again the original images are used in each case, despite them not technically being in the folder that QImage's load method is using.
I believe that the resources may somehow be getting embedded into the executable (http://qt-project.org/doc/qt-4.8/resources.html), however I have no idea if this is the case or not.
My question is: How do I get QT to use the updated version of an image file?
// Setup the path to the image file
std :: string m_imagePath = ":/ErrorImages/NoImageExpected.png";
// Load the image file
m_image.load( m_imagePath.c_str() );
// At runtime, the original image is displayed every time - despite it being amended, and in a separate test case, removed completely
I am working on a linux Virtual Machine on Windows 8.
I have a UI which displays various different images, I have modified one of these image resources however when I run the program, the original image is still used. I have tried removing every single image from the folder that QT uses to load them from, in the hopes that this would at least stop any image being loaded, however once again the original images are used in each case, despite them not technically being in the folder that QImage's load method is using.
I believe that the resources may somehow be getting embedded into the executable (http://qt-project.org/doc/qt-4.8/resources.html), however I have no idea if this is the case or not.
My question is: How do I get QT to use the updated version of an image file?
// Setup the path to the image file
std :: string m_imagePath = ":/ErrorImages/NoImageExpected.png";
// Load the image file
m_image.load( m_imagePath.c_str() );
// At runtime, the original image is displayed every time - despite it being amended, and in a separate test case, removed completely