Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Solved]Problem with my .exe
Forum Update on Monday, May 27th 2025

[Solved]Problem with my .exe

Scheduled Pinned Locked Moved General and Desktop
6 Posts 2 Posters 1.3k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    federico
    wrote on last edited by
    #1

    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:
    libgcc_s_dw2-1.dll
    mingwm10.dll
    QtCore4.dll
    QtGui4.dll

    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.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      steno
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0
      • F Offline
        F Offline
        federico
        wrote on last edited by
        #3

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

        1 Reply Last reply
        0
        • S Offline
          S Offline
          steno
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          • S Offline
            S Offline
            steno
            wrote on last edited by
            #5

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

            1 Reply Last reply
            0
            • F Offline
              F Offline
              federico
              wrote on last edited by
              #6

              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();
              a.addLibraryPath(sDir+"/plugins");
              a.addLibraryPath(directorioactual);
              MainWindow w;
              w.showMaximized();

              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

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved