Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This application failed to start because it could not find or load the Qt platform plugin "windows" > in "" #51

Open
Elyasin opened this issue Apr 9, 2020 · 3 comments

Comments

@Elyasin
Copy link

Elyasin commented Apr 9, 2020

I installed the binaries for the Data Sources in 32 bit and 64 bit. The installation went fine. When I use the Twain App then I can see the data sources; I tested the Twain App on 32 bit and 64 bit architecture. I can also connect to the data sources on both architectures.

However, when I want to perform a scan then I run into an unhandled exception and the following output is displayed (again on both architectures):

This application failed to start because it could not find or load the Qt platform plugin "windows"
in "".

Reinstalling the application may fix this problem.

Unfortunately I have no experience with Qt and don't know what the error message means exactly in this case. My guess is that I have to install Qt or part of Qt and set it up in order to make this work.

It would be great if this can be addressed; e.g. explaining in the README file what to install and how to set up so that the virtual Data Sources can perform a scan.

@Elyasin
Copy link
Author

Elyasin commented Apr 9, 2020

I figured a solution that worked for me on 64 bit architecture, although I feel it is not the best practice to do so.

I installed Qt (the version mentioned in the README, which is 64 bit). In my case I went to the installed Qt directory and looked for the files (qwindows.dll (release) and qwindowsd.dll (debug)) because a search in the internet hinted that the error message means this file cannot be found.

In my case they were located under C:\Qt\5.9.9\msvc2017_64\plugins\platforms and to make it work I copied the folder platforms to the directory of the executable (of the Twain App for example).

I could perform a scan.

I do not have Qt 32bit though, but my feeling is that a similar approach would work.

I still do not really understand the subject. I can use a Twain App command line and I can use a Twain App Qt as far as I could see.

I wonder why I would need Qt in order to run a scan from the command line. This was not the case in a previous version of the command line Twain App as far as I remember.

@meoiswa
Copy link

meoiswa commented Feb 25, 2021

I had this issue for a long time, this is how I managed to fix it:

  1. Install Qt 5.9.9 with the msvc2017_64 component
  2. Assign the Environment Variable QTDIR=C:\Qt\Qt5.9.9\5.9.9\msvc2017_64
  3. Assign the Environment Variable QT_QPA_PLATFORM_PLUGIN_PATH=%QTDIR%\plugins\platforms\

This allows the driver to be invoked from a program that doesn't have the Qt dlls (in my case, a console program)

@bb991
Copy link

bb991 commented May 27, 2021

I have found simpler solution so here it is:

  1. Install data source sample first
  2. Install twain app sample also
  3. Check if you can scan via app sample
  4. Create QT_QPA_PLATFORM_PLUGIN_PATH environment variable pointing at app sample dir with dll.

For example in my case the only thing I did was to set:
QT_QPA_PLATFORM_PLUGIN_PATH = C:\Program Files (x86)\TWAIN Working Group\TWAIN 2.4.1 App Sample (32-bit)\win32\platforms

This folder should contain the following dll:
qwindows.dll

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants