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

后端 未结 3 848

Want to manually install 32-bit versions of Qt 5.7 so that I will be able to deploy my app to not only 32-bit but 64-bit machines as well.

Initiall

相关标签:
3条回答
  • 2021-01-04 17:56

    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.

    0 讨论(0)
  • 2021-01-04 18:10

    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

    0 讨论(0)
  • 2021-01-04 18:13

    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.

    0 讨论(0)
提交回复
热议问题