Add 32-bit versions of Qt 5.7 on a 64-bit machine

Want to manually install 32-bit versions of Qt 5.7 so that I can deploy my application not only with 32-bit, but also with 64-bit machines.

Initially, when I installed it on my 64-bit computer running Windows 7 , I only selected 64-bit components, and therefore, I can only select the MSVC2015_64 bit set in Qt Creator to build my application with.

Since I want to deploy my application on a 32-bit Windows 10 machine , I am trying to add 32-bit versions of Qt to my installation; tried Tools > Options > Build & Run > Add... with no success. I was looking for some answer / guide to documentation and other online sources, but could not find how to achieve this in Windows.

Can I manually add other versions of Qt to the current installation, or do I need to reinstall Qt? Also, can I just install Qt with the desired versions of Qt in a different directory than the first installation, or will it ruin the PATH variables?

+7
qt qt-creator
source share
3 answers

You need to run the Qt Maintenance Tool: Start โ†’ Programs โ†’ Qt โ†’ Qt Maintenance Tool.

Skip Qt registration (if you are not using a commercial version of Qt).

Select Add or Remove Features and click Yes. You can select other kits to download and install *.

Then Qt Creator should automatically add these sets, you just need to add them to your project: go to the project settings as soon as your project is open and you will find the โ€œAdd Setโ€ button in the upper left corner.

* Qt Maintenance Tool may offer you to upgrade components first if a new version is available.

+10
source share

Kits are the key to your problem. A set in Qt consists of:

  • Qt version (and I'm not talking about the creator of Qt)
  • Compiler (you need to choose the correct compiler that matches your Qt version, I will explain this in more detail below)
  • Debugger (correct version 32 or 64 bit).

You can install as many versions of Qt as you want, Qt Creator will usually automatically detect them all. Do not worry, this will not damage your path, you can also install 2 different compilers (for example, the MingW compiler and MSVC aka VS).

in the Qt site: https://www.qt.io/download-open-source/

select the version or versions of Qt that you want to install and install (the package includes Qt Creator, so you do not need to install it twice)

enter image description here

you will also download the correct version of your compilers and debbuggers (if you donโ€™t already have them) and install them.

After you have downloaded all the components and installed them, go to Qt Creator:

  • Tools โ†’ Options

    From the lhs menu, select Build and Run

enter image description here

you can go and check the versions of Qt, the compiler and the debugger to make sure everything has been detected automatically.

if this is normal, you can create your own kit:

  • go to the sets tab.
  • you can add a new set, but I prefer to clone an existing one and then edit it.
  • select the clone and select the correct compiler, the correct version of Qt and the correct debugger, rename your kit so that you can recognize it. Save and close.

To use the kit you created, you need to select it in the project menu, see the screenshot below:

enter image description here

you can create as many sets as you want, so you can have different configurations.

+4
source share

QtCreator can handle any number of โ€œcollectionsโ€, where the collection is a combination of the compiler + Qt version + (optional) deployment target. See http://doc.qt.io/qtcreator/creator-configuring.html

+1
source share

All Articles