Important: Please read the Qt Code of Conduct -

Platform windows fail but ONLY if I associate a file format.

  • I've made a simply app that works ok, can be deployed to other computers since the folder structure is ok I mean /platforms/

    What's the problem then? that I need to associate a file format to this app, and as soon as I double click on that file the app tries to be open but the wellknown error appears:

    • This application failed to start because it could not find or load the Qt platform plugin "windows".
      Reinstalling the application may fix this problem.

    I've tried to pre-load everything but without any luck:

        QString sDir = QCoreApplication::applicationDirPath();

    Thank you in advance any tip is welcome!

  • Moderators

    How do you associate the app with the format? What's the resulting structure in the registry for it?
    Put in your deployment directory file named qt.conf with following content and see if it works:

    Plugins = .

    This will make the app looking for plugins (including "platforms" folder) in the app directory instead of working directory.

Log in to reply