Deployment glitch on other machines
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:
Code:
void MainWindow
::makeImage(QImage image
) {
if (!fileName.isEmpty())
{
pictureScene->clear();
if (image.isNull())//this is where the error occurs, even though I give the image a fileName
{
tr("Cannot load %1.").arg(fileName));
return;
}
pixmap->convertFromImage(image);
pictureScene->addItem(picture);
}
}
and the slot for opening the image:
Code:
void MainWindow::openImage()
{
tr
("Open Image File"),
QDir::currentPath());
makeImage(newImage);
}
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.
Re: Deployment glitch on other machines
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.
Re: Deployment glitch on other machines
Wow, that was simple. Thanks alot. I'm such newb.