Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

could not find or load the Qt platform plugin "windows" in "".



  • I am trying to run a 3rd party game launcher called UO Steam, to run the game Ultima Online.

    I have 3 PCs running it ATM and my son wants to play too so I was trying to run it on a 4th/his.

    I'm getting an error msg:

    This application failed to start because it could not find or load the Qt platform plugin "windows" in "".
    Reinstalling the application may fix this problem.

    I am running it in Admin Mode

    I have done an SFC and

    DISM.exe /Online /Cleanup-image /Scanhealth

    DISM.exe /Online /Cleanup-image /Restorehealth

    I have removed UOS and reinstalled - I even rebooted the bloody PC shezzzzz what else can I do ?!?!?!?!?

    On the C drive I found an empty dir called .QtWebEngineProcess

    I am at a total loss on how to even tackle this issue.


  • Moderators



  • Im sorry but I am an end-user and Im lost ... I have used this UO Steam program for years and have never had this problem.

    I am keen to try 'stuff' if someone can suggest things at a very basic level.

    I looked at the link: https://doc.qt.io/qt-5/windows-deployment.html

    But Im not really sure what I am looking at.


  • Moderators

    @Pixijayne
    did you move the exe? if so, you basically also need to copy the folders beside it.
    or a dependency of the Qt windows plugin might be missing.



  • We did install a new HDD a few months ago and copy over all the files.

    But I have used add/remove progs and deleted the program UO Steam - and reinstalled a completely fresh install ...

    Im about to try removing all registry and %appdata% ... then try another fresh install



  • Is this Qt Windows 'thing' a totally separate 'thing' that needs installing, on my system ?

    Or should it be contained within the UO Steam prog ?



  • @Pixijayne

    I think your game or game launcher uses Qt for some GUI and your exe points to the directory where the required Qt stuff should be located. If you move your exe without creating a shortcut or link, the paths are not correct anymore.
    Normally re-installing the game completely should fix it.

    It's the same when deploying your own app that uses Qt. You need the qt files, otherwise your program doesn't work outside your development environment.

    @Pixijayne said in could not find or load the Qt platform plugin "windows" in "".:

    Is this Qt Windows 'thing' a totally separate 'thing' that needs installing, on my system ?

    and no, you don't need to install Qt by yourself. If the game launcher from your game uses Qt, all the related stuff comes with the game. This is exactly your problem. It looks like the game can't find its Qt files

    Maybe this helps
    https://forum.qt.io/topic/90293/could-not-find-or-load-the-qt-platform-plugin-windows-in



  • Ok .. Im still stuck

    I have uninstall both the game and the launcher ..

    Reinstalled to a portable HDD and I still have the same problem



  • @Pixijayne

    Check the Qt_PATH variable, like suggested in that linked thread. Is it empty?



  • You are probably missing some files (the platform plugin folder for sure). When I distribute an application it has a layout something like this:

    ├── Qt5Core.dll
    ├── Qt5Gui.dll
    ├── Qt5Widgets.dll
    ├── application.exe
    ├── libgcc_s_seh-1.dll
    ├── libstdc++-6.dll
    ├── libwinpthread-1.dll
    └── platforms
        ├── qdirect2d.dll
        ├── qminimal.dll
        ├── qoffscreen.dll
        └── qwindows.dll
    

    Note: Some files in the above list such as libgcc_s_seh-1.dll, libstdc++-6.dll, and libwinpthread-1.dll are a result of the compiler you are using. I am using MinGW64 and those files are required as a result. You list will probably be different but you will still need the platforms subfolder and contents.



  • @Pl45m4 I did try to .. here are the results ..

    Microsoft Windows [Version 10.0.18362.657]
    (c) 2019 Microsoft Corporation. All rights reserved.

    C:\Windows\System32>echo %QT_PLUGIN_PATH%
    %QT_PLUGIN_PATH%

    C:\Windows\System32>

    Microsoft Windows [Version 10.0.18362.657]
    (c) 2019 Microsoft Corporation. All rights reserved.

    C:\Windows\System32>echo %PATH%
    C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\WIDCOMM\Bluetooth Software;C:\Program Files\WIDCOMM\Bluetooth Software\syswow64;C:\Program Files\nodejs;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\Program Files\WorldPainter;C:\Program Files (x86)\Skype\Phone;C:\WINDOWS\System32\OpenSSH;C:\Program Files (x86)\EaseUS\Todo Backup\bin;C:\Program Files (x86)\Common Files\Acronis\SnapAPI;C:\Users\Administrator\AppData\Roaming\npm;%USERPROFILE%\AppData\Local\Microsoft\WindowsApps;C:\Program Files (x86)\EaseUS\Todo Backup\bin\x64\

    C:\Windows\System32>



  • @Rondog I have uninstalled and reinstalled the launcher ... I have also copied a working copy, from another PC to this PC and its giving the same error. Here is a screenshot of the dir .. there is a Platforms dir and it has one file/.dll in it - qwindows.dll

    I am so in over my head, thank you guys for trying to help path II.PNG



  • @Pixijayne said in could not find or load the Qt platform plugin "windows" in "".:

    Is this Qt Windows 'thing' a totally separate 'thing' that needs installing, on my system ?
    Or should it be contained within the UO Steam prog ?

    I'm thinking whether it is a Windows system problem?.....
    Or have you tried deleting unnecessary residual directories and trying again?....


  • Moderators

    @Pixijayne said in could not find or load the Qt platform plugin "windows" in "".:

    ... I have also copied a working copy, from another PC to this PC and its giving the same error.

    My guess is that something in your latest PC's environment is interfering with Qt.

    If one of the folders in your PATH contain Qt DLLs, for example, that can cause UOS to try to load the DLL from the wrong folder, which then fails because the different versions of the DLLs are not compatible.


  • Moderators

    @Pixijayne question, do your pc (and the other's where its working) have different version of windows on it?



  • @JKSH .. How difficult is it to workout if/what its is a PATH issue ....

    @J-Hilk .. Both running Win 10 Pro ....


  • Lifetime Qt Champion

    Hi,

    Use the command line to start your application. There you can modify the PATH environment variable for that session only and remove each entry one after the other until your application works or it's empty and there's something else at play.



  • You could turn on the plugin debug option and see what it says. You need to set the environment variable QT_DEBUG_PLUGINS to a non-zero value and compile your program with the 'console' option set. When you run it from a terminal window you should see something like this:

    c:\MyProjects\downloadeditor>cd bin
    
    c:\MyProjects\downloadeditor\bin>downloadeditor
    QFactoryLoader::QFactoryLoader() checking directory path "C:/MyProjects/downloadeditor/bin/platforms" ...
    QFactoryLoader::QFactoryLoader() looking at "C:/MyProjects/downloadeditor/bin/platforms/qdirect2d.dll"
    Found metadata in lib C:/MyProjects/downloadeditor/bin/platforms/qdirect2d.dll, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "direct2d"
            ]
        },
        "archreq": 0,
        "className": "QWindowsDirect2DIntegrationPlugin",
        "debug": false,
        "version": 331008
    }
    
    
    Got keys from plugin meta data ("direct2d")
    QFactoryLoader::QFactoryLoader() looking at "C:/MyProjects/downloadeditor/bin/platforms/qminimal.dll"
    Found metadata in lib C:/MyProjects/downloadeditor/bin/platforms/qminimal.dll, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "minimal"
            ]
        },
        "archreq": 0,
        "className": "QMinimalIntegrationPlugin",
        "debug": false,
        "version": 331008
    }
    
    
    Got keys from plugin meta data ("minimal")
    QFactoryLoader::QFactoryLoader() looking at "C:/MyProjects/downloadeditor/bin/platforms/qoffscreen.dll"
    Found metadata in lib C:/MyProjects/downloadeditor/bin/platforms/qoffscreen.dll, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "offscreen"
            ]
        },
        "archreq": 0,
        "className": "QOffscreenIntegrationPlugin",
        "debug": false,
        "version": 331008
    }
    
    
    Got keys from plugin meta data ("offscreen")
    QFactoryLoader::QFactoryLoader() looking at "C:/MyProjects/downloadeditor/bin/platforms/qwindows.dll"
    Found metadata in lib C:/MyProjects/downloadeditor/bin/platforms/qwindows.dll, metadata=
    {
        "IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
        "MetaData": {
            "Keys": [
                "windows"
            ]
        },
        "archreq": 0,
        "className": "QWindowsIntegrationPlugin",
        "debug": false,
        "version": 331008
    }
    
    
    Got keys from plugin meta data ("windows")
    loaded library "C:/MyProjects/downloadeditor/bin/platforms/qwindows.dll"
    QFactoryLoader::QFactoryLoader() checking directory path "C:/MyProjects/downloadeditor/bin/platformthemes" ...
    QFactoryLoader::QFactoryLoader() checking directory path "C:/MyProjects/downloadeditor/bin/styles" ...
    QFactoryLoader::QFactoryLoader() checking directory path "C:/MyProjects/downloadeditor/bin/iconengines" ...
    QFactoryLoader::QFactoryLoader() checking directory path "C:/MyProjects/downloadeditor/bin/imageformats" ...
    QFactoryLoader::QFactoryLoader() checking directory path "C:/MyProjects/downloadeditor/bin/accessible" ...
    QFactoryLoader::QFactoryLoader() checking directory path "C:/MyProjects/downloadeditor/bin/accessiblebridge" ...
    QLibraryPrivate::unload succeeded on "C:/MyProjects/downloadeditor/bin/platforms/qwindows.dll"
    
    c:\MyProjects\downloadeditor\bin>
    

    You can set the environment variable from the Control Panel - System - Environment Variables option (Win7). The console option is set in the PRO file and it looks like this in this example:

    CONFIG +=	release \
    		warn_on \
    		qt \
    		thread \
    		console
    

    You will need to run qmake and probably clean everything. I tried it without adding the console option to the pro file and it didn't do anything.



  • @Rondog

    It's not OP's project. @Pixijayne is an end user who's trying to play / install a game, which is using Qt. So there is no code available.



  • @Pl45m4 Yeah, I missed that detail.


Log in to reply