Install Latest Qt

Print Friendly, PDF & Email

How to install the latest Qt?

怎样安装最新版的 Qt?

It is similar to install Qt on different platforms. Qt is famous for being cross-platform, which is a blessing for developers: with minor changes, we can use out code on different platforms. In comparison, MFC uses C++, however, being very primitive and offers poor performance due to lack of improvements in the recent 20 years. C# offered by Microsoft is a powerful UI tool, however it can not be moved to Linux or Mac.
在不同的平台上安装 Qt 是很接近的。Qt 因其非凡的跨平台能力而出名,使得开发者只需简单修改代码就能够让软件在不同的平台上发布。
与用 C++ 开发的 MFC 对比,Qt 比 MFC 更加容易使用,MFC 早已经被时代所淘汰。微软的 C# 非常好用,但是无法做到跨平台,只能在 Windows 上使用。

But installing Qt can be more complex than installing Visual Studio, here I give the guidance of installing Qt on Windows. It is similar on different platforms. I will also give tip on Linux at the end of the blog.
但是安装 Qt 看上去比安装 VS 要复杂,所以我这里以 Windows 系统为例,给出安装 Qt 的教程。对于 Linux 平台,我在最后也会给出建议。

Step 1 – Download Installer on Qt Official Web

在 Qt 官网下载安装包

Choose Version


Just go directly to the official download site:

Choose "Go Open Source". (As it is free of charge.)

Sign in or Sign up


Sign up according to the requirements (If you already have a Qt account, just sign in). Having signed up for Qt, you need to confirm at your e-mail.

Start Downloading


The website may not recognise you immediately, so when you try to download, you may need to log in again.

When you see what is below in the picture, you have succeeded downloading the installer.

Step 2 – Run Installer


Wait a little while.

Log in



Open Source Obligation


Your Qt programmes must go open-source.

Contribute or not

是否将信息传给 Qt

This is not important.

Choose Path


Mind that you need to choose "Custom installation".

Choose Components


Here I install Qt 6.1.2 (which is the latest version of Qt now, remember not to download preview version which can contain numerous bugs) and Qt 5.15.2 (which is the last version of Qt 6). The reason behind downloading two versions is that Qt 6 is new and we can have some newer features; Qt 5 is currently widely used so we may not build those projects on Qt 6 due to compatibility problems. Kits here I choose both MSVC and MinGW. You can choose Qt Debug Information Files if you are not squeezed in storage (which is as large as 10G). Qt Creator is by default chosen so no more action is needed. Other components just follow what I have ticked.
这里我安装的是 6.1.2(最新版本,但是注意不要下载 preview 版本,这回又很多 bug) 和 5.15.2 版本(Qt 5 的最后一个版本,因为以前的很多项目使用 Qt 5 编写,使用 Qt 6 来编译可能会存在较大的兼容问题)。编译器我选择 MSVC 和 MinGW,你也可以选择 Qt Debug Information Files 如果你的电脑有足够的空间(这会很大,有 10G)。Qt Creator 自动选择过了,无须额外操作。其他的组件只需跟着我选的来即可。


Here I choose components for Windows, and there can be minor differences on different platforms.
这里是 Windows 版本的组件,其他平台会有区别。

Licence Agreement

同意 Qt 开源协议


Choose Name


Just set it as "Qt".
设置为 “Qt” 即可。

Step 3- Wait


That can be a long time. If there are error window, do not panic, choose Retry.

At this time, you can go to my open-source Qt programme Fractal Designer at GitHub: Don’t forget to star or fork. Download or clone the project.
在等待的时候,你可以访问我的 GitHub 项目 Fractal Designer,将其下载或者克隆。对了,千万别忘记给 star 或者 fork

Step 4 – Configure Projects and Basic Knowledge


Choose kit

选择 kit

Choose Qt 6.1.2 MSVC and MinGW version. My Fractal Designer is built with Qt 6 so do not use Qt 5.15.2. But don’t worry, this can be changed later.
选择 Qt 6.1.2 MSVC 和 MinGW 版。我的这个项目是用 Qt 6 写的,所以不要使用 Qt 5。(不过这些设置都是可以之后修改的。)

Complile and Run

  • Ctrl + B: Compile / 编译
  • Ctrl + R: Run / 运行
  • Ctrl + S: Save / 保存

Wow, amazing! Such a beautiful app is generated!

Why not visit the homepage of Fractal Designer to discover more? Tip: the banner picture is randomly chosen from pictures created by Fractal Designer.
为什么不访问 Fractal Designer 的网站发现更多呢?提示:网站的封面图每次不一样,但都是通过 Fractal Designer 设计出来的。

Fractal Designer:
FRD Homepage

By default, the compiled files are in another folder. But in configuration, you can change that by disable shadow building. You can not run the exe file directly due to lack of dll. This time you need to use windeployqt, which I will cover later in another blog.
默认来说,编译文件都在另一个与源码同级的文件夹内,不过可以在配置里取消 shadow building 使生成在源码文件夹内。注意,你找到的 exe 文件不能直接运行因为缺少 dll 文件。处理的办法 windeployqt 我将在其他博客中讲到。

Tips for Linux Users

Linux 用户建议

Choose Components


Choose GCC kit instead.
与 Windows 的区别是选择 GCC 编译器。
Qt for Linux

Run Installer


Give the permission to the installer. You can use the command line.

Linux Permission

Run the installer. (There were repetitions due to I did not give it permission.) Discard all the warnings.
再运行 installer(上面有重复是因为一开始没有给权限)。忽略所有警告。
Run installer

Chinese and English are written by Teddy van Jerry.
中文与英文均由 Teddy van Jerry 撰写。

1 Response

  1. qxjmlqcdt ffmmc pnyxnrz pqdl jjktalccgmxzkoj

Leave a Reply

Your email address will not be published. Required fields are marked *