Hi folks,
Basic Description:
I made Qt application that loads BMP, JPG, PNG... files. It works perfectly on PC with installed QtSDK.
Problem:
When I deploy it to PC without installed QtSDK (by deploying I mean only copying exe file and some dll files to the same folder) then problems occure.
The application can still load BMP and PNG files, but can not load JPG files.
Code:
void Widget::OpenImage()
{
if (!fileName.isEmpty())
{
QPixmap pixmapP
(fileName
);
//HERE IS THE PROBLEM !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
if (pixmapP.isNull())
{
QMessageBox::information(this, tr
("Image Viewer"), tr
("Cannot load %1.").
arg(fileName
));
return;
}
m_pixmapImage = pixmapP;
}
}
void Widget::OpenImage()
{
QString fileName = QFileDialog::getOpenFileName(this, tr("Open File"), QDir::currentPath());
if (!fileName.isEmpty())
{
QPixmap pixmapP(fileName); //HERE IS THE PROBLEM !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
if (pixmapP.isNull())
{
QMessageBox::information(this, tr("Image Viewer"), tr("Cannot load %1.").arg(fileName));
return;
}
m_pixmapImage = pixmapP;
}
}
To copy to clipboard, switch view to plain text mode
Question:
Can anyone give me some directions how to deploy Qt application that loads JPG files?
I visited http://doc.qt.nokia.com/latest/deployment-windows.html but it wasn't helpful for me (configure command not recognized in Qt command prompt).
Notes:
I have attached my complete source code and print screens that show the structure of my "deploy" folder
Bookmarks