[Interest] Qt permanently broke on computer

Nuno Santos nuno.santos at imaginando.pt
Mon Apr 26 17:16:07 CEST 2021


If it is not finding the platform plugin for windows, maybe the qmlscanner is not being able to specify the right plugins to link, usually because it is not property scanning you qml files.

When you run qmake, qmlimportscanner will scan all your qml files to know which plugins to include. It will then generate a .cpp file with those includes, usually name as TARGET_plugin_import.cpp:

➜  cat TARGET_plugin_import.cpp
// This file is autogenerated by qmake. It imports static plugin classes for
// static plugins specified using QTPLUGIN and QT_PLUGIN_CLASS.<plugin> variables.
#include <QtPlugin>

I have discovered that qmlimportscanner not always behaves as expected, scanning everything single qml file in the directory recursively. But that bug seems to be fixed already: https://bugreports.qt.io/browse/QTBUG-55259 <https://bugreports.qt.io/browse/QTBUG-55259>

If you say that other projects work, then I would suggest observing the contents of TARGET_plugin_import.cpp and see what is being generated. Then I would review the project.

Suggestion, create an empty project run it, and then rung the qtdeploy steps. If it works, then the problem is in your project structure. Strip it to the bone and ensure it is working when stripped. Then start to gradually add things until you find the culprit.

Hope this helps.



> On 26 Apr 2021, at 16:01, Jason H <jhihn at gmx.com> wrote:
>> I tried to port an app on a Win10 PC. That went well. Then I tried to deploy (windeployqt) it.
>> Now when I run it in creator I get:
>> 10:26:28: Starting C:\Users\Admin\Projects\build-phidget-spinner-Desktop_Qt_5_15_2_MinGW_64_bit-Debug\debug\phidget-spinner.exe ...
>> qt.qpa.plugin: Could not find the Qt platform plugin "windows" in ""
>> I have deleted the C:\Qt dir and re-installed.
>> I have cleaned the app source dir and deleted the shadow build dirs, deleted the .pro.user file,
>> I launched QtC from the start menu.
>> I have no idea how to get this working again.
> Some additional info:
> Other projects work.
> The crash is in this statement:
> QGuiApplication app(argc, argv);
> the stack indicates a crash starting at:
> QGuiApplicationPrivate::createPlatformIntegration()
> All the online help (stackexchange) seems to be about deployment, but I'm just trying to run it in creator.
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> https://lists.qt-project.org/listinfo/interest

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20210426/bcecdd6b/attachment.html>

More information about the Interest mailing list