Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"There's no Qt version assigned to this project for platform Win32" - visual studio plugin for Qt

I have a Qt project I am working on in Visual Studio 2010, with the Qt Visual Studio Add-in (for Qt 4.8). The project is running fine on my work machine, and I am trying to run it on my home machine. When I try to build, I get the following error:

There's no Qt version assigned to this project for platform Win32.

Please use the 'change Qt version' feature and choose a valid Qt version for this platform.

However, it's set up to use a valid Qt version (another project I'm working on at home uses this plugin as well). Why is this occurring? When I got to Qt -> Qt Options, I see a valid version (4.8.0). Thanks

like image 248
zebra Avatar asked May 04 '12 16:05

zebra


4 Answers

Did you select a proper Qt version in the Qt settings of your project?

More detailed: If you right-click on the project there should be a "Qt Project Settings" option (or similar - I use the german version) near the end of the context menu. In there you can set the Qt version that this specific project uses. Is this one possibly not set correctly?

like image 104
Fabian Avatar answered Oct 27 '22 17:10

Fabian


Solution:

  1. Right click your project;
  2. Qt Project Settings;
  3. Under the Properties tab, you will find the option Version;
  4. change it to a proper value;

Now, go ahead with your project.

Hope to help

like image 31
helsinki Avatar answered Oct 27 '22 16:10

helsinki


Had the same problem with a x64 Visual Studio 2019 solution on Windows using Qt 5.15.0. Based on the answer from @Fabian and the excellent comment from @sitting-duck:

  • Install the Qt VS Tools extension
  • Select Extensions > Qt VS Tools > Qt Options
  • On the Qt Versions tab click Add
  • Set "Version Name" to something like "Qt-5.15.0"
  • Set "Path" to "[QT-PATH]\5.15.0\msvc2019_64"
  • Open Project Properties > Qt Project Settings > General > Qt Installation
  • Ensure this is set to "Qt-5.15.0" and close Project Properties
  • Right-click the solution (in the Solution Explorer tab) and select Change Solution's Qt Version
  • Ensure Qt-5.15.0 is selected

You should be good to go.

like image 40
AlainD Avatar answered Oct 27 '22 18:10

AlainD


Open vcxproj file in a notepad, look for QtVersion...something=... Ensure that the version value is really 4.8.0 (or whatever is your actual QT SDK version).

like image 25
Igor R. Avatar answered Oct 27 '22 16:10

Igor R.