View Full Version : Deployment glitch on other machines

7th May 2011, 21:09
Hi there.
So my problem is this: I deploy my app (with those 4 dll's included in the release folder) and it works perfectly on my machine. When I run the executable on another system that doesn't have Qt installed it runs without a problem, with one important difference. When I try to open an image file it sees it as null and doesn't add it to my graphics view. This does not happen on my machine. Everything else works well.

The method for adding the image to the graphics view:

void MainWindow::makeImage(QImage image)
if (!fileName.isEmpty())
if (image.isNull())//this is where the error occurs, even though I give the image a fileName
QMessageBox::information(this, tr("MainWindow"),
tr("Cannot load %1.").arg(fileName));
picture = new QGraphicsPixmapItem(*pixmap);

and the slot for opening the image:

void MainWindow::openImage()
fileName = QFileDialog::getOpenFileName(this,
tr("Open Image File"), QDir::currentPath());
QImage newImage(fileName);

So this works as it should on my computer, but for some reason it does not on others. Does anyone have any idea what am I doing wrong, cause I'm lost. Thanks in advance.

7th May 2011, 21:22
Deploy the image plugins for the format(s) you are using, e.g. qjpeg4.dll, into an "imageformats" directory in the same directory as your executable.

7th May 2011, 21:46
Wow, that was simple. Thanks alot. I'm such newb.