What is a Qt version?



  • Hi there,

    I'm having trouble with a Qt project where I'm attempting to target an x86 system. The problem arises from the fact that my project is targeting an x64 system but trying to link with an x86 static library.

    Because I plan on using the x86 library (i.e. not the x64 version), the obvious solution is to change my Qt project to target an xj86 system. However, I'm having a heck of time trying to do that.

    I first attempted to create a Kit that would target x86. I go ahead and do this, select the compiler as Microsoft Visual C++ Compiler (x86). I assumed the kit was finished and applied the changes.

    I then go to the project tab in Qt creator in attempt to select the newly created kit, however, it's grayed out. (screenshot.

    It states that I don't have a version of Qt associated with the Kit. I then go edit the kit to choose a Qt version and it tells me that I have no Qt versions that can target an x86 project.

    I'm completely confused as to what this means. What does it mean by 'Qt Version'? There are several different components that comprise Qt (QtCreator, QtDesigner, etc.) What does it mean by Qt version?

    Furthermore, I had stumbled across this page looking for Qt versions Qt download index. I am completely confused between all these different options. There not a simple x86 or x64 selection for windows. Instead, all the Windows options contain an x86, and then they go on to list a winrt/msvc/64 etc.

    TLDR; What exactly is a Qt version? Why would I need to install a different Qt version (QtCreator, QtDesigner, etc.) to target a different platform? How do I simply 'add a version' per the Qt page on the topic. It simply says to 'select a version' without going into detail on how you obtain a different version. Do I need to do a complete reinstall?


  • Moderators

    @tomizzo11
    beside a matching compiler you also need to add a matching Qt version in QtCreator


  • Moderators

    Hi @tomizzo11,

    What does it mean by 'Qt Version'? There are several different components that comprise Qt (QtCreator, QtDesigner, etc.) What does it mean by Qt version?

    • "Qt version" = "Version of the Qt libraries" (for Windows, this means "Version of the Qt DLLs")
    • "Kit" = "Qt version" + "compatible compiler"

    Qt Creator and Qt Designer are tools that help you develop software using Qt libraries. They are independent of your Qt version. A single copy of Qt Creator can be used to build and link software against many different Qt versions.

    However, note that an offline Qt installer contains one Qt version as well as one copy of the development tools. This means, if you install multiple Qt versions via the offline installer, you will also get multiple copies of the tools. The online installer (from https://www.qt.io/download-open-source/ ) does not have this issue.

    Furthermore, I had stumbled across this page looking for Qt versions Qt download index. I am completely confused between all these different options. There not a simple x86 or x64 selection for windows. Instead, all the Windows options contain an x86, and then they go on to list a winrt/msvc/64 etc.

    Roughly, the format of the filenames are qt-<license_type>-<host_os>-<tool_bitness>-[<target_platform>]-[<compiler>]-<version_number>

    So, if you want to build software for 32-bit Windows, you can download qt-opensource-windows-x86-msvc2015-5.7.0.exe, qt-opensource-windows-x86-msvc2013-5.7.0.exe, or qt-opensource-windows-x86-mingw530-5.7.0.exe. The first 2 packages require you to download the compiler from Microsoft; the last one includes the MinGW compiler.



  • A Qt version is the set of DLL files that make up the Qt runtime plus the qmake build tool used to build code using that Qt version.

    Creator does work fine with kits not having a Qt version set up. But since the qmake build system is part of the Qt library package that build system is unavailable for such kits. Try qbs or CMake instead.

    CMake needs to be installed separately though and also needs some setup in the kit. The defaults should be fine though -- provided creator found the CMake binary in PATH. You will need to set up a CMake (a tab next to kits in the options menu) otherwise and then make the kit use that CMake binary.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.