plugin cannot be loaded for module “QtQuick“ && Could not load the Qt platform plugin “windows“

简介: 本文讨论了在Qt应用程序中遇到的平台插件加载问题,包括具体的错误信息、解决方案和参考链接。问题表现为无法加载“QtQuick”模块的插件,并且无法找到“windows”平台插件。解决方案是修改环境变量`Qt5_DIR`以使用正确的Qt版本和编译器环境。

一 问题引入

qt.qpa.plugin: Could not load the Qt platform plugin "windows" in "" even though it was found.

This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: direct2d, minimal, offscreen, webgl, windows

qrc:/main.qml:1:1: plugin cannot be loaded for module "QtQuick": Cannot load library C:\Qt\5.15.2\msvc2019_64\qml\QtQuick.2\qtquick2plugin.dll: ???????????????

二 问题解决

环境变量使用:

%Qt5_DIR%

修改Qt5_DIR的值即可使用不同的编译器环境。

三 参考链接

(4条消息) Windows下错误could not find the Qt platform plugin “windows” in “C:\Qt\XXX”的解决办法_zmyzyc1988的博客-CSDN博客

相关文章
|
3月前
|
存储 算法 C++
【Qt应用开发】复刻经典:基于Qt实现Windows风格计算器(加减乘除、删除、归零功能全解析)
在Qt中,"栈"的概念主要体现在两个层面:一是程序设计中的数据结构——栈(Stack),二是用户界面管理中的QStackedWidget控件。下面我将分别简要介绍这两个方面:
128 4
|
3月前
|
关系型数据库 MySQL Linux
Qt连接Mysql出现问题(一):“Driver not loaded Driver not loaded“
第一眼看见这张图我也觉得很奇怪,显示有QMYSQL但是又说没有,这不自相矛盾吗!
537 4
|
1天前
|
安全 Windows
windows系统中,通过LOAD到入csv格式的文件到neo4j中,如何写文件路径
windows系统中,通过LOAD到入csv格式的文件到neo4j中,如何写文件路径
5 0
|
2月前
|
PHP Windows
【Azure App Service for Windows】 PHP应用出现500 : The page cannot be displayed because an internal server error has occurred. 错误
【Azure App Service for Windows】 PHP应用出现500 : The page cannot be displayed because an internal server error has occurred. 错误
|
2月前
|
开发者 iOS开发 C#
Uno Platform 入门超详细指南:从零开始教你打造兼容 Web、Windows、iOS 和 Android 的跨平台应用,轻松掌握 XAML 与 C# 开发技巧,快速上手示例代码助你迈出第一步
【8月更文挑战第31天】Uno Platform 是一个基于 Microsoft .NET 的开源框架,支持使用 C# 和 XAML 构建跨平台应用,适用于 Web(WebAssembly)、Windows、Linux、macOS、iOS 和 Android。它允许开发者共享几乎全部的业务逻辑和 UI 代码,同时保持原生性能。选择 Uno Platform 可以统一开发体验,减少代码重复,降低开发成本。安装时需先配置好 Visual Studio 或 Visual Studio for Mac,并通过 NuGet 或官网下载工具包。
101 0
|
2月前
|
iOS开发 Android开发 MacOS
从零到全能开发者:解锁Uno Platform,一键跨越多平台应用开发的神奇之旅,让你的代码飞遍Windows、iOS、Android、macOS及Web,技术小白也能秒变跨平台大神!
【8月更文挑战第31天】从零开始,踏上使用Uno Platform开发跨平台应用的旅程。只需编写一次代码,即可轻松部署到Windows、iOS、macOS、Android及Web(通过WASM)等多个平台。Uno Platform为.NET生态带来前所未有的灵活性和效率,简化跨平台开发。首先确保安装了Visual Studio或VS Code及.NET SDK,然后选择合适的项目模板创建新项目。项目结构类似传统.NET MAUI或WPF项目,包含核心NuGet包。通过简单的按钮示例,你可以快速上手并构建应用。Uno Platform让你的技术探索之旅充满无限可能。
46 0
|
2月前
|
C++ Windows
vs2019 This application failed to start because it could not find or load the QT platform plugin
这篇文章介绍了在VS2019中解决QT程序运行时出现的“无法找到或加载QT平台插件”错误的步骤,通过将必要的DLL文件和插件目录复制到项目解决方案中解决了问题。
|
4月前
|
Windows
Qtdesigner报错:This application failed to stat could not find or load the Qt platform plugin “windows“
Qtdesigner报错:This application failed to stat could not find or load the Qt platform plugin “windows“
|
4天前
|
边缘计算 安全 网络安全
|
1月前
|
网络安全 虚拟化 Windows
windows 11安装openSSH server 遇到的"kex_exchange_identification: read: Connection reset"问题
windows 11安装openSSH server 遇到的"kex_exchange_identification: read: Connection reset"问题