Can't display images in Qt
-
I am using Qt on Windows 10 x64 with MSVC 2017. I compiled the code and moved the exe file (and others) to another PC. That PC is using Windows 7 x64.
I found that the layout looked different and, to make things worse, the images are not displaying.
I stored all the images under /images/ of that exe file and used QDir::currentPath() + "/images/" + cardid + ".jpg"; to load the image. It worked alright on my computer. But it doesn't display on that Windows 7 PC.Any suggestions on how to solve it?
-
Hi
Added error handling so u know if it doesn't find the image or what is wrong.Also, use deployment tool so u don't miss any image plugins.
http://doc.qt.io/qt-5/windows-deployment.html
http://www.tripleboot.org/?p=138for some formats it might need extra folder and dll(s)
-
Problem solved. Thanks for the help!