安装Qt 5.6:我应该选择哪些组件? [英] Installing Qt 5.6: Which components should I choose?

查看:4084
本文介绍了安装Qt 5.6:我应该选择哪些组件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我打算开始学习Qt(我没有以前的知识),所以我已经下载了最新稳定的Web安装程序的Windows和Linux(我已经到机器),按照Windows的向导的方向我得到到选择组件步骤,但我很困惑的是什么是什么,我真正需要什么。



作为一个新手和一个非常基本的知识Qt我的计划是在Windows和Linux上测试我的代码为桌面控制台软件和桌面图形接口软件,AFAIK我需要构建我的代码与跨平台编译器,如G ++,运行在Windows和Linux,所以我认为这是为什么Qt提供MinGW的安装,但是查看安装程序的可用组件列表我不能完全理解我应该选择哪个MinGW版本,这是Qt 5.6安装程序的列表:





MinGW 4.9.2有两个选项,你能帮助理解有什么区别吗?我必须安装两个?



另一个问题是:使用当前版本的Qt,Qt Widgets或Qt Quick创建UI软件的最佳方法是什么?

解决方案

顶部的一个,在Qt部分,是一个Qt框架的分布:头文件和库编译MinGW GCC 4.9 .2。



下面的一个,在工具部分是一个编译器工具链:MinGW GCC 4.9.2版。



警告:QtCreator中的GDB前端有重大的性能问题,特别是关于启动时间。它不是很响应,以及。这使我真的不舒服在调试会话。例如,获取变量的值可能需要一两秒。你不会有这个问题的Microsoft工具链。它也不会发生在Linux上。



此外,Qt对于MinGW只有一个32位的官方分布。所以你不能构建64位程序。您将需要另一个工具链,并自己从源代码构建Qt分发(或从第三方源代码获取)。




您可以使用Windows上的Visual Studio和Linux上的GCC。它通常工作正常,因为Qt隐藏了大部分的平台和编译器细节。一个优点是这些编译器,标准库,运行时和调试器是非常不同的:你获得双倍的编译器警告,堆内存诊断和代码可移植性。只是确保你在两个平台上不时编译。
您甚至可以在Windows上安装多个工具链和Qt distibutions,并检查所有这些。您可以设置您的项目,并在两次工具链之间切换。您可以随时添加和删除它们。实验!不要害怕打破它。 ;)

$ b $bÚ
启用geek模式: 20 Gb的完全幸福



关于Qt和QtQuick只有一个答案:这取决于。另外它是offtopic在StackOverflow要求。您可以查看这些答案。我强烈建议您尝试这两种方式。


I'm planning to start learning Qt (I have no previous knowledge) so I've downloaded the latest stable web installer for Windows and Linux (I've got to machines), following the directions of the Windows's wizard I got to the "Select Components" step but I'm very confused about what is everything and what do I really need.

As a newbie and with a very basic Knowledge of Qt my plan is to test my code on Windows and Linux for both Desktop Console Software and Desktop Graphics Interface Software, AFAIK I need to build my code with a cross-platform compiler like G++ which runs on Windows and Linux, so I think that is why Qt offers the installation of MinGW, but looking in the list of available components of the installer I can not fully understand which MinGW version should I choose, this is the list for Qt 5.6 installer:

There are two options for MinGW 4.9.2, Could you help to understand what is the difference? I must install both?

Another question I got is: What is the most preferred way to create UI Software using current version of Qt, Qt Widgets or Qt Quick?

解决方案

Top one, in "Qt" section, is a distribution of Qt framework: header files and libraries compiled with MinGW GCC 4.9.2.

Bottom one, in "Tools" section is a compiler toolchain: MinGW GCC version 4.9.2.

You need both.

Be warned: GDB frontend in QtCreator has significant performance issues, especially concerning startup time. It is not very responsive as well. This makes me really uncomfortable during debugging sessions. For example, fetching values of variables may take a second or two. You will not have this problem with Microsoft toolchain. It also doesn't happen on Linux.

Also, Qt for MinGW has only a 32-bit official distribution. So you cannot build 64-bit programs with that. You will need another toolchain and to build Qt distribution from source code yourself (or to get it from 3rd party source).

You may use Visual Studio on Windows and GCC on Linux. It usually works fine, as Qt hides most of the platform and compiler specifics. An advantage is that these compilers, standard libraries, runtimes and debuggers are drastically different: you get double strength of compiler warnings, heap memory diagnostics and code portability. Just make sure you compile on both platforms time to time. You may even have multiple toolchains and Qt distibutions installed on Windows and check against all of them. You can set-up your projects and switch between toolchains in two clicks. You can add and remove them any time. Experiment! Don't be afraid to break it. ;)
P.S. geek mode enabled: 20 Gb of full happiness

Regarding Qt vs QtQuick there is only one answer for that: it depends. Also it is offtopic on StackOverflow to ask that. You might take a look at these answers. I strongly encourage you to try both.

这篇关于安装Qt 5.6:我应该选择哪些组件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆