[Solved]Problem with my .exe

  • I'm having problem when I execute my app in a machine that doesn't have QT on it. I create a folder with my .exe and this dlls:

    The problem is with the images, it doesn't show anyone in a machine without QT.
    Any suggest?
    Thanks and sorry for my horrible english.

  • Do you have the image format dll's? They are located in the Qt dir under plugins/imageformats.

  • Yes, and I tryed to put all of those in my folder with my .exe and no results.
    Thanks for answer

  • ok but is it in the correct sub directory, here is a link for windows.

    "Sub directory is imageFormats":https://qt-project.org/doc/qt-5.0/qtdoc/deployment-windows.html#qt-plugins

  • You can also get Qt to look in other locations for the plugins by using this function, QApplication::setLibraryPaths.

  • Thank you for help me, I solved my problem by doing this:

    int main(int argc, char *argv[])
    QApplication a(argc, argv);
    QString directorioactual;
    directorioactual = QDir::currentPath();
    QString sDir = QCoreApplication::applicationDirPath();
    MainWindow w;

    return a.exec();


    Note: directorioactual is in spanish if you don't understand
    Note 2, I put in the folder with my .exe the image format dll's

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.