Qt手记

记录一下在学习和使用Qt过程中的知识点

Windows环境缺失

报错信息为:

1
2
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.

通过Windows软件依赖匹配中的操作即可修复

Windows软件依赖匹配

通过使用windeployqt.exe工具,可以为编译好的程序配置使用环境

例如对于test.exe,我可以输入:

1
windeployqt.exe .\test.exe

输出类似于:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Adding Qt6Svg for qsvgicon.dll
Skipping plugin qtvirtualkeyboardplugin.dll due to disabled dependencies (Qt6Qml Qt6Quick).
Direct dependencies: Qt6Core Qt6Gui Qt6Widgets
All dependencies   : Qt6Core Qt6Gui Qt6Widgets
To be deployed     : Qt6Core Qt6Gui Qt6Svg Qt6Widgets
Qt6Core.dll is up to date.
Qt6Gui.dll is up to date.
Updating Qt6Svg.dll.
Qt6Widgets.dll is up to date.
Updating opengl32sw.dll.
Updating D3Dcompiler_47.dll.
Updating libgcc_s_dw2-1.dll.
Updating libgcc_s_seh_64-1.dll.
Updating libgcc_s_sjlj-1.dll.
Updating libstdc++-6.dll.
Updating libstdc++_64-6.dll.
Updating libwinpthread-1.dll.
Updating libwinpthread_64-1.dll.
Creating directory D:/Project/test/build/iconengines.
Updating qsvgicon.dll.
Creating directory D:/Project/test/build/imageformats.
Updating qgif.dll.
Updating qicns.dll.
......
使用 Hugo 构建
主题 StackJimmy 设计,DoubleCat 修改
© Copyright Licensed under CC BY-NC-SA 4.0