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

隐身守侯 提交于 2019-11-30 19:01:44

You have to launch Qt Maintenance Tool : Start -> Programs -> Qt -> Qt Maintenance Tool.

Skip the Qt login (unless you are using a commercial version of Qt).

Select "Add or remove components" and click yes. You'll be able to select other kits to download and install*.

Then Qt Creator should automatically add those kits, you'll just have to add them to your project : go to project settings once your project is open, and you'll find "Add kit" button in the upper left corner.

*Qt Maintenance Tool may prompt you to update components first if there's a new version available.

Kits are the key to your problem. A kit in Qt is composed of:

  • Version of Qt (and i'm not talking about Qt creator)
  • Compiler (you have to choose the correct compiler corresponding to your Qt Version, i will explain that more in detail, below )
  • Debugger (correct version 32 or 64 bits).

You can install as many versions of Qt as you wish Qt Creator will usually autodetect them all. Don't worry it won't damage your path, you can also install 2 different compilers (MingW and MSVC a.k.a VS compiler for example).

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

pick the version or versions of Qt you want to install and install them (the package include Qt Creator so no need to install it twice)

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

Once you've downloaded all the components and installed them, you go to Qt Creator :

  • Tools -> Options

    in the lhs menu select Build & Run

you can go and check Qt Versions, Compiler and debugger to see if everything was auto-detected well.

if it's ok you can then create your kit :

  • go to the kits Tab
  • you can either add a new kit, but i prefer cloning an existing one and then edit it.
  • select the clone and choose the correct compiler, the correct version of Qt and the correct Debugger, rename your kit so you can recognize it. Save and close.

to use the kit you created you have to choose it in the project menu see the screenshot below :

you can create as many kits as you wish, so you can have different configurations.

QtCreator can handle any number of "kits", where a kit is a combination of compiler + Qt version + (optionally) a deployment target. See http://doc.qt.io/qtcreator/creator-configuring.html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!