Problem solving: It could not find or load the Qt platform plugin "Windows"

Source: Internet
Author: User
Tags stack trace

Problem: When writing a program with Qt5.3.2 and release, the necessary DLLs have been added to the folder, but running the program on the other machine failed, the following situation occurs:

Workaround one: In the C:\Qt\Qt5.3.2\5.3 into the Mingw482_32 folder, will plugins\platforms the entire directory copy exe executable files in the folder directory, the program can be run.

The following is a summary of several other methods on the Web:

Solution Two: Copy your EXE required QT plugin, first in the source program in the main function to add Qapplication::addlibrarypath ("./plugins");

Copy the DLL in the C:\Qt\Qt5.3.2\5.3\mingw482_32\plugins\ to EXE to execute the file directory is OK.

For example, the program on its own machine running normal, copied to other computers after some pictures can not be shown to try this method. At this point the possible solution is to enter the EXE file under the directory of the new folder Imageformats, and then go to QT plugins under the Imageformats folder to copy the corresponding image encoded DLL and LIB. For example, in the program used in the picture is JPG format, copy Qjpeg.dll and qjpeg.lib past.

Workaround Three: Use the Process Explorer to view the DLLs used by the program

Process Explorer is a very useful tool. Windows system and application monitoring tools, developed by Sysinternals, are now incorporated into Microsoft's portfolio. Not only combines the capabilities of the Filemon (file monitor) and the Regmon (Registry Monitor) two tools, but also adds a number of important enhancements. Includes stability and performance improvements, powerful filtering options, modified process tree dialogs (Increased process survival chart), filter entries from right-click menus that can be transformed by click Location, integrated stack trace dialog with source storage, faster stack trace, 32-bit loading on 64-bit Windows Log file capabilities, monitor images (DLLs and kernel-mode drivers) are loaded, all operations are logged when the system boots, and so on. (from Baidu Encyclopedia of the explanation)

Since the DLL can be monitored, you can use QT creator to run the program that will be published before the program is published, see the DLL used by the EXE in the Process Explorer, and in general, it is likely that the program failed to run without the corresponding DLL file.

This is the list of DLLs I need to publish a simple program with QT:

Problem solving: It could not find or load the Qt platform plugin "Windows"

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.