When a program fails to open a file that does exist, and you have specified a relative path, the odds are very good that the current working directory is not what you think it is (see QDir::currentPath()).
You can obtain the location of the program executable using QCoreApplication::applicationDirPath() and build a path to the file that way.
You can embed images in the executable using the resource system.
It's also possible the image cannot load because a suitable image format plugin is not available (should not be the case with PNG).
Bookmarks