Solved Problems with using resources with Visual Studio (Qt addin installed)
-
Icons and resources work with QT Creator 5.8.0 but not Visual Studio 2015 (with qt addin).
For example, loading a QIcon :
QIcon(":/res/icons/icongreen.png");Works in Qt Creator, but not in Visual Studio? The resources are added to the project as usual, and it worked at some point, but has now stopped working. Any hints?
-
The funny thing is, that I have a similar Qt project compiled under VS2015. Here the icons work!? There is no difference on the qrc file, and the way the icons are loaded. How can this be?
-
Ok, so I guess I found the solution, but cannot explain how it worked before :O
The qt binaries were not put next to the executable in the build folder, which suddenly gave runtime errors, because it couldn't find the executables. I cannot explain how it worked before, but as I put the qt dll's next to the executable it worked.
I know, not the best of explanations, but a good advice would be to always have the binaries next to the executable.