We are trying to set up a Qt development/runtime system for our users at work. This should allow them to build and/or run either a 32-bit or 64-bit Qt application at their discretion (on the same machine).
Active3 years ago
'This application failed to start because it could not find or load the Qt platform plugin 'windows' 'I tried to manually add in the application path of the target pc (not my pc) the directories. Plugins/platforms/ and put qwindows.dll inside but did not help. I am using MSVC project file and InstallShield (as I said). Nov 30, 2016 Hello, I've been using Anaconda on Windows 10 for the past few months. However, today I tried launching the program and got the following error: '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.'
The problem is that if we don't do anything, the user gets the dreaded 'This application failed to start because it could not find or load the Qt platform plugin 'windows' dialog. Even the prebuilt executables like the designer give you this.
The only ways we've found to fix this are to either add a qt.conf file pointing to the correct plugins directory for that executable's bittage, or to copy the correct 'plugins' directory hierarchy underneath the executable's directory. We can do that with custom Visual Studio build rules, but it's a major PITA. It seems like there ought to be a way to do it globally.
I tried setting the environment variable QT_PLUGIN_PATH to %ProgramFiles%QtPlugins , but it only works for the 64-bit EXE files. For some reason, even the 32-bit EXE files get the %ProgramFiles% expanded to 'C:Program Files'. As near as I can tell, Qt doesn't check anything in HKEY_LOCAL_MACHINESOFTWARE, so I can't redirect that way.
It seems like there ought to be a way to do this. Is there?
Peter Mortensen
8,5881616 gold badges6262 silver badges8585 bronze badges
T.E.D.T.E.D.
1 Answer
The solution I finally hit on was using Windows' file redirection of
%windir%system32 , which is not under any control of the executable. This involves:
Obviously an application installer would also have to perform these steps.
T.E.D.T.E.D.
Not the answer you're looking for? Browse other questions tagged windowsqt32-vs-64-bit or ask your own question.
Hi Meghan,
We'd like to verify a few things in order for us to assist you effectively. Kindly confirm the following:
This issue may happen due to system file corruption. We suggest running the System file checker. System File checker (SFC) scan is done to check if there are any corrupted system files that could be causing this issue. Kindly follow the steps below:
Qt.qpa.plugin Could Not Find The Qt Platform Plugin Windows In C++
Ref: Using System File Checker in Windows 10
![]()
If no corrupted system files were found, we suggest the following steps to deploy the DISM command lines:
Pyqt5 Could Not Find Or Load The Qt Platform Plugin WindowsMatplotlib Could Not Find Or Load The Qt Platform Plugin Windows
Let us know if you need further assistance.
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |