Application No Qt Platform Plugin Could Be Initialized? [Fixed]
When launching certain apps on Windows, many users receive the “This application failed to start because no Qt platform plugin could be initialized” error. Don’t worry. This post of MiniTool explores several effective troubleshooting methods.
This Application Failed To Start Because No Qt Platform Plugin Could Be Initialized
According to user reports, the “this application failed to start because no Qt platform plugin could be initialized” error can occur with many apps such as OneDrive, Designer, Python, etc. This error often appears after installing a series of Windows updates. Here’s a true example from the answersmicrosoft.com forum:
After a series of recent Windows updates my Surface displays the following error when we log in OneDrive – This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. I have searched the community and followed the responses given to others suffering the same fate but so far this has not resolved the issue. Looking to know what I should attempt next? https://answers.microsoft.com/en-us/windows/forum/all/application-failed-to-start-because-no-qt-platform/205e4259-dcbc-4d72-addb-8e7edb9663e9
Qt is a cross-platform software that was designed to create graphical user interfaces and cross-platform applications on Windows, Linux, macOS, and Android. However, when something went wrong with the Qt platform, you may receive the “This application failed to start because it could not find or load the Qt platform plugin Windows” error.
It seems like reinstalling the application may fix the error. However, some users encounter new errors when reinstalling the app. Don’t worry. Here we explore several effective troubleshooting methods. Let’s try.
How to Fix the “No Qt Platform Plugin Could Be Initialized” Error
After analyzing extensive user reports, we summarize the 6 applicable ways to fix the Qt platform plugin Windows error. You can try them in order until the error gets solved or choose the ones that work best for you.
Fix 1. Replace the Qt Files in the Destination
The first and proven method is to replace the Qt files in the destination folder. Here we take Python for example. To do so, follow the steps below:
Step 1. Press the Win + E keys to open the File Explorer, select This PC, type pyqt5_tools in the search box, and hit Enter.
Step 2. Right-click the pyqt5_tools folder once the search is complete and select Open folder location.
Step 3. Then go to the folder path “PyQt5 > Qt > plugins”, and then open the Plugin folder, right-click the platforms folder, and select Copy.
Step 4. Go to the site-packages folder that you initially opened and go to pyqt5_tools > Qt > bin.
Step 5. Right-click any empty space inside the bin directory and select paste. Then confirm it when you see the “Replace the files in the destination” message.
Now, you can relaunch the app and see if the “this application failed to start Qt platform Windows” message persists.
Fix 2. Perform a Clean Boot
One of the possible reasons for the “this application failed to start Qt platform Windows” error is third-party software conflicts. If you are not sure which app is causing the conflict, you can perform a clean boot (click on the Hyperlink to know the detailed steps). Once you find out the conflicting software, uninstall it and check if the error is fixed.
Fix 3. Check System File Corruption
Sometimes corrupted system files can trigger various errors and issues when running your apps such as the “no Qt platform plugin could be initialized” error. So, we recommend you run an SFC scan or DISM to check system files.
Step 1. Type cmd in the search box, and then right-click Command Prompt and select Run as administrator option.
Step 2. Type the sfc /scannow command in the elevated command prompt and hit Enter. After that, the SFC tool will scan and try to repair the corrupted system files automatically.
Step 3. If the SFC command was unable to repair corrupt system files, you can try running the following DISM commands:
- DISM /Online /Cleanup-Image /CheckHealth
- DISM /Online /Cleanup-Image /ScanHealth
- DISM /Online /Cleanup-Image /RestoreHealth
Fix 4. Reinstall the App
As the error message hints, reinstalling the application may help fix the problem. However, many users cannot uninstall the app smoothly. Don’t worry. We summarize the following 3 applicable ways to reinstall the app. (Here we take reinstalling OneDrive for example)
Uninstall OneDrive via the Run box:
Step 1, Press Win + R keys to open the Run dialog box, and then type the following command in it and hit Enter. Here make sure you replace the OneDriveSetup.exe path with the actual location.
%userprofile%\AppData\Local\Microsoft\OneDrive\Update\OneDriveSetup.exe
Step 2. Once uninstalled, go through the installation steps and restart your computer and check if the error gets fixed. If it fails to uninstall the application, you can try the following 2 methods.
Uninstall OneDrive via CMD:
Step 1. Type cmd in the Run dialog box and press Ctrl + Shift + Enter keys to open the elevated Command Prompt window.
Step 2. Type the following command and hit Enter to uninstall the app. If you are running on a 32-bit system, replace SysWOW64 with System32. This will force uninstalling the app.
- taskkill /f /im OneDrive.exe
- %SystemRoot%\SysWOW64\OneDriveSetup.exe /uninstall
Uninstall OneDrive from Settings:
Step 1. Right-click the Start menu at the bottom left and select Apps and Features.
Step 2. Inside the Applications window, search for OneDrive by name and click the Uninstall button.
Step 3. Then follow the on-screen prompts to complete the uninstallation. After that, you can reinstall the app and check if the error disappears.
Fix 5. Download the Update.xml File of the App
Some users reported that the error can be fixed by downloading the update.xml file of the app. If you can’t reinstall OneDrive via the above method, try this solution. Click here to download the OneDriveSetup.exe file, and run it to install the latest version of OneDrive.
Fix 6. Undo the Recent Changes
Many people reported that “This application failed to start because it could not find or load the Qt platform plugin Windows” error mainly occurs after installing a series of Windows updates. If this scenario applies to you, you can try performing a system restore or uninstalling these updates manually.
Step 1. Press the Win + I keys to open the Settings app, and then select Update & Security > View update history.
Step 2. Click on Uninstall updates, and then right-click the most recent update and select Uninstall. Then follow the on-screen prompts to complete the uninstallation. Then repeat the same procedure to uninstall other Windows updates.
Classic Shell Needs to Configure Itself for the New OS? [Fixed]
What is Classic Shell? How to fix the “Classic Shell needs to configure itself for the new operating system” error? Now, get the answers from this post.
How to resolve «no Qt Platform Plugin could be initialized» for a Qt5 application?
I am working on a python application based on PyQt5. Everything was running good until I redo my PC and reinstall windows again because of some issue. I had copied my environment and after reinstalling Anaconda, I copied that environment again in env folder. Now the problem is that, when I run my code in PyCharm IDE, it displays and error dialog like this: I have tried multiple solutions such as: Solution 1: Change the QT Files Location Sometimes, a simple trick such as changing the QT files location is enough to get rid of the error. Here’s how you can do it:
- Launch File Explorer and open This PC.
- Using the Search field, search for pyqt5_tools.
- When Windows finishes the search, right-click the pyqt5_tools and head to Open folder location.
- Head to PyQt5 > Qt > bin. Copy the platforms folder. in my case bin is not available in this folder
- Make a new search for site-packages and open the folder.
- There, paste the platforms folder.
- Windows will warn you there’s already a folder with the same name. Click Replace the files in the destination.
Solution 2: Run an SFC Scan
There’s a chance Windows display the “Application failed because no QT platform plugin could be initialized” error due to corrupt system files. Fortunately, Windows has a built-in tool to help you fix the problem.
In the Start menu search bar, search for command prompt and select Run as administrator. Then, run the sfc /scannow command line. Windows will scan and automatically replace any corrupted system file.
Nothing worked for me, I’m getting the same error all the time. How can I resolve the error displayed in the figure above?
Any help will be appreciated, Thanks.
Ошибка при запуске примеров, использующих PyQT5
Здравствуйте. У меня при запуске простейших примеров на Python (в PyCharm) возникает ошибка: This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Хотя и PyQT5 и PyQT5-tools (с дизайнером) установлены. Переустанавливать пробовал, не помогает.
При запуске из командной строки: qt.qpa.plugin: Could not find the Qt platform plugin «windows» in «» This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Создание .exe qt. Ошибка при запуске «no Qt platform plugin could be initialized»
Ошибка This application failed to start because no Qt platform plugin could be initialized
Здравствуйте. При запуске QT приложения возникает такая ошибка: This application failed to start.
This application failed to start because no Qt platform plugin could be initialized
from PyQt5 import QtWidgets, uic import sys app = QtWidgets.QApplication(sys.argv) window =.
This application failed to start because not Qt platform plugin could be initialized
Привет! Я делаю релиз для своего приложения, но получаю следующую ошибку при запуске приложения.
Ошибка not find or load the Qt platform plugin «minimal» в Ubuntu IDE (qtcreator)
Здравствуйте. В основных сообщениях при компиляции это: Не удалось загрузить типы из модуля.
Регистрация: 09.10.2021
Сообщений: 108
Переместил все библиотеки в папку с экзешником, но когда хочу запустить его, вылазит ошибка
5006 / 4683 / 985
Регистрация: 11.10.2019
Сообщений: 12,245
Сообщение от DaniilB
вылазит ошибка
про которую все должны догадаться
Регистрация: 09.10.2021
Сообщений: 108
Алексей1153, не загрузился файл. Zip вообще не прикрепляется
5006 / 4683 / 985
Регистрация: 11.10.2019
Сообщений: 12,245
DaniilB, левые DLL накидал, оттого и краш. Нужно брать те DLL, которые лежат в папке компилятора, использовавшегося при сборке проекта
Регистрация: 09.10.2021
Сообщений: 108
Алексей1153, Я при помощи консоли qt делал. командой windeployqt.exe . Так не стоит делать?
10140 / 6127 / 1442
Регистрация: 25.05.2015
Сообщений: 18,583
Записей в блоге: 14
Стоит. Но эта команда не всё делает.
На форуме уже полно тем про деплой.
Регистрация: 09.10.2021
Сообщений: 108
Использовал команду windeployqt.exe, запускаю программу, выдает ошибку, что нет Qt6Cored.dll, Qt6Widgetsd.dll, Qt6Guid.dll. Когда загружаю их и запускаю программу, программа крашится.
10140 / 6127 / 1442
Регистрация: 25.05.2015
Сообщений: 18,583
Записей в блоге: 14
Сообщение от DaniilB
Qt6Core d .dll
Деплоить отладочную версию. Не то вы делаете, не то.
Переключите в релиз, пересоберите, и на собранный exe натравите windeployqt.
Регистрация: 09.10.2021
Сообщений: 108
Rius, сделал, теперь такая ошибка
10140 / 6127 / 1442
Регистрация: 25.05.2015
Сообщений: 18,583
Записей в блоге: 14
dll не те, похоже.
Например, если из поставляемых с Qt Creator вытащили. А надо из сборочных.
600 / 616 / 96
Регистрация: 29.05.2015
Сообщений: 3,811
Сообщение было отмечено DaniilB как решение
Решение
Блин, сколько раз эта тема повторяется!
В Qt4 было всё просто — достаточно в папку с исполняемым файлом поместить 4 библиотеки. И простые приложения, не требующие дополнительных библиотек (типо аудио, интернет и прочее) — запускались.
В Qt5 всё максимально запутали, так что без стакана не разберёшься. Но со стаканом можно вполне:
— создаёшь папку, в которой будет находиться твой ексешник с библиотеками.
— в ней создаёшь 2 папки: bin и plugins — как показано на рисунке.
Содержимое папок тоже показано на рисунке. У меня Qt5 установлен на диске С (по умолчанию). Все библиотеки и папка plugins взяты из папки, находящейся по адресу: C:\Qt\Tools\QtCreator\bin\. Ексешники вставишь свои, которые хочешь запустить. У меня на рисунке их два — факторизация и проверка на простоту.
Удачи. Я пробовал подбирать библиотеки с помощью предлагаемых на форуме программ — у меня так ничего и не заработало.