I see this post was a while ago but I just ran across the same issue and this may be the solution for someone else that runs into this again. I have a different setup but I got the same error.
My application is running on Windows with Visual Studio 2019 and I needed mine to work properly in both x64 and x86 configurations. I ran into this error when I tried running my project in x86. Here was my solution.
- Go to your project's Properties page
Project -> <ProjectName> Properties
- Check your Qt Project Settings
Configuration Properties -> Qt Project Settings
- Make sure you are pointing to the correct Qt Installation under
General -> Qt Installation
You can check this by checking your Qt Options in the Qt VS Tools Extension for VS. If you don't have it make sure you add it. Mine says "Qt5.13.2" which for me is pointing to the x64 build of Qt but it needs to be pointing to the x86 build.
- To change this you need to create a Qt Version that points to the x86 build and change the Qt Installation in Qt Project Settings to point to that one.
Extensions -> Qt VS Tools -> Qt Options
- Under Qt Versions tab check the Qt Version that your Property Sheet was pointing to. If it is not correct for your configuration here is where you can create another one.
Press the Add button to "Add New Qt Version"
Build Host: Windows
Version name: <give it a name> (I did "Qt5.13.2_86")
Path: <Path to correct build> (mine was "C:\Qt\Qt5.13.2\5.13.2\msvc2017")
compiler: msvc (automatically sets to this when selecting Windows for the Build Host)
Press OK
- Now go back to your Qt Installation under Qt Project Settings in your Configuration Properties in your Project's Property sheet and make it point to the correct Qt Version (Mine was from "5.13.2" -> "5.13.2_86").
This was my solution for a different problem but the same error.
X86
. Sorry I can't help any further. – Builder