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. Platform windows fail but ONLY if I associate a file format.

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

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 423 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
    FrankE
    wrote on 24 Feb 2016, 10:55 last edited by
    #1

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

    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:

        CoreApplication::addLibraryPath(QCoreApplication::applicationDirPath());
        QDir::setCurrent(QCoreApplication::applicationDirPath());
        QCoreApplication::addLibraryPath("./");
        QString sDir = QCoreApplication::applicationDirPath();
        QCoreApplication::addLibraryPath(sDir);
        QCoreApplication::addLibraryPath(sDir+"/plugins/");
        QCoreApplication::addLibraryPath(sDir+"/platforms/");
    

    Thank you in advance any tip is welcome!

    1 Reply Last reply
    0
    • C Offline
      C Offline
      Chris Kawa
      Lifetime Qt Champion
      wrote on 24 Feb 2016, 13:58 last edited by Chris Kawa
      #2

      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:

      [Paths]
      Plugins = .
      

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

      1 Reply Last reply
      1

      2/2

      24 Feb 2016, 13:58

      • Login

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