1

Probably most of the people that has experience with Qt5 libraries will say that I should copy qwindows.dll to myappfolder/platforms/qwindows.dll.

That was already made and working flawlessly.

The problem is that I've registered the extension of my files with that app and when I double click to open a file the app crashes since it cannot find that qwindows.dll.

Desesperatly also I tried without luck this code:

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

But I had no luck neither.

Any tip?

As I wrote in the comments this is not the same a the deploy issue since the .exe opens fine if it gets open directly.

3
  • Possible duplicate of How to deploy a Qt application on Windows? Commented Nov 24, 2015 at 19:24
  • No, as I said I can deploy it without problems I mean it opens fine if I try to open the .exe directly, the problem only happens if I associate an extension and open that file, so it could be something similar to open it using a command line. Commented Nov 24, 2015 at 19:26
  • Try to discriminate between a wrong searchpath or a plugin problem. If only qwindows.dll is a problem you might need to add a qt.conf file Commented Dec 3, 2015 at 10:58

1 Answer 1

0

So I am guessing that by running it like this actually sets the application default directory where the shortcut is. You could test it by putting your shortcut/whatever file in the same directory as your .exe and see if that works.

There are ways to tell Qt loader to look elsewhere but I have never actually played with it. Look here:http://www.tripleboot.org/?p=536 And search for QT_QPA_PLATFORM_PLUGIN_PATH I think it's on about setting a system variable to your .exe location set QT_QPA_PLATFORM_PLUGIN_PATH=c:\myapp

Good luck

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.