<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Qt &#8211; IT Crafter</title>
	<atom:link href="https://blog.itcrafter.net/archives/tag/qt/feed" rel="self" type="application/rss+xml" />
	<link>https://blog.itcrafter.net</link>
	<description></description>
	<lastBuildDate>Wed, 27 Mar 2024 16:51:59 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>
	<item>
		<title>下载与安装 Qt 6.5</title>
		<link>https://blog.itcrafter.net/archives/110</link>
					<comments>https://blog.itcrafter.net/archives/110#respond</comments>
		
		<dc:creator><![CDATA[IT Crafter]]></dc:creator>
		<pubDate>Sun, 26 Nov 2023 16:00:35 +0000</pubDate>
				<category><![CDATA[Qt]]></category>
		<guid isPermaLink="false">https://blog.itcrafter.net/?p=110</guid>

					<description><![CDATA[Qt 提供了两款图形界面工具来进行安装和配置： 除了图形化的 Qt Online Installer 和 Ma ... <a title="下载与安装 Qt 6.5" class="read-more" href="https://blog.itcrafter.net/archives/110" aria-label="Read more about 下载与安装 Qt 6.5">阅读更多</a>]]></description>
										<content:encoded><![CDATA[
<hr class="wp-block-separator has-alpha-channel-opacity"/>



<p>Qt 提供了两款图形界面工具来进行安装和配置：</p>



<ul class="wp-block-list">
<li>Qt Online Installer：用于进行在线的全新安装；</li>



<li>Maintenance Tool：包含在 Qt 安装包内，用于添加/删除组件。</li>
</ul>



<p>除了图形化的 Qt Online Installer 和 Maintenance Tool 工具以外，Qt 还提供了命令行工具，即无需用户交互即可完成安装与卸载。</p>



<p>以下主要介绍 Qt Online Installer 的安装步骤以及 Maintenance Tool 的配置方法。</p>



<h3 class="wp-block-heading">准备工作</h3>



<p>注册并登录 <a href="https://login.qt.io/">Qt Account</a>。</p>



<p>众所周知，Qt 是一款<strong>商业软件</strong>，但依然可以通过 OpenSource license 来免费学习 &amp; 使用 Qt。点击下图中的<a href="https://www.qt.io/download-open-source">链接</a>获取开源版 Qt：</p>



<figure class="wp-block-image size-large"><img decoding="async" src="https://pic2.helpfully.top:9522/uploads/2023/10/6537db9338c9d.png" alt=""/></figure>



<p>值得注意的是，开源版 Qt 要求使用者遵循以下三款开源 licenses（之一）：</p>



<ul class="wp-block-list">
<li>LGPL v3</li>



<li>GPL v2</li>



<li>GPL v3</li>
</ul>



<p>开源版 Qt 其实还提供了源码编译的选项，能最大限度降低兼容性问题。但为简单起见，建议初次接触 Qt 的开发者直接采用 Qt Online Installer 或者 Maintenance Tool 来安装Qt。</p>



<h3 class="wp-block-heading">通过 Qt Online Installer 安装 Qt</h3>



<p>点击开源版说明页面的下载图标，或直接访问<a href="https://www.qt.io/download-qt-installer-oss?hsCtaTracking=99d9dd4f-5681-48d2-b096-470725510d34%7C074ddad0-fdef-4e53-8aa8-5e8a876d6ab4">下载页面</a>，即可下载 Qt Online Installer：</p>



<figure class="wp-block-image size-large"><img decoding="async" src="https://pic2.helpfully.top:9522/uploads/2023/10/6537e2220641a.png" alt=""/></figure>



<p>然后选择所需的平台，目前提供了 macOS，Windows 和 Linux 三款主流平台的安装工具：</p>



<figure class="wp-block-image size-large"><img decoding="async" src="https://pic2.helpfully.top:9522/uploads/2023/10/65391d224605b.png" alt=""/></figure>



<p>双击下载完成的 Qt Online Installer，进入安装流程。</p>



<p>按照界面提示依次登录账户，确认开源义务，确认安装目录和安装方式。如果选择默认的自定义安装方式，须自行选择所需的组件。</p>



<figure class="wp-block-image size-large"><img decoding="async" src="https://pic2.helpfully.top:9522/uploads/2023/10/653923fce364e.png" alt=""/></figure>



<p>无须纠结，后续可以通过 Maintenance Tool 添加/删除组件。另外，官网给出了不同应用场景下的安装选项建议：</p>



<figure class="wp-block-table aligncenter"><table><thead><tr><th>应用场景</th><th>安装选项</th></tr></thead><tbody><tr><td>桌面开发</td><td><em>desktop development</em> 选项。如须使用非默认的编译工具链，则选择 <em>Custom Installation</em>，然后选择所需的编译工具链。</td></tr><tr><td>移动设备</td><td><em>mobile development</em> 选项。如须针对特定平台进行开发，则选择 <em>Custom Installation</em>，然后选择对应的移动设备平台，比如 Qt for Android 或 Qt for iOS。</td></tr><tr><td>嵌入式设备</td><td><em>Custom Installation</em> 选项，然后从 Boot to Qt 中选择所需的 Qt modules 和编译工具链，视具体设备而定。</td></tr><tr><td>Android 车机</td><td><em>Custom Installation</em> 选项，然后选中 Qt for Android Automotive。</td></tr><tr><td>自动化领域</td><td><em>Custom Installation</em> 选项，然后从 Qt for Automation/Qt M2M Protocols 中选择所需的 Qt modules 和编译工具链，视具体设备而定。</td></tr><tr><td>MCUs</td><td><em>Custom Installation</em> 选项，选中 Qt for MCUs</td></tr></tbody></table></figure>



<p>以桌面开发 + Android 开发的 Qt 6.5.3 LTS 版本为例，再加上 Qt Design Studio 和 Qt Creator，空间占用需要 ~32 GB，有点猛 <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f641.png" alt="🙁" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>



<figure class="wp-block-image size-large"><img decoding="async" src="https://pic2.helpfully.top:9522/uploads/2023/10/653923e44855e.png" alt=""/></figure>



<p>安装包的大小是 6.82 GB，水管不够大，得等个把小时&#8230;</p>



<figure class="wp-block-image size-large"><img decoding="async" src="https://pic2.helpfully.top:9522/uploads/2023/10/6539255778817.png" alt=""/></figure>



<p>安装完成后，默认会打开 Qt Design Studio README 文件和 Qt Creator。</p>



<figure class="wp-block-image size-large"><img decoding="async" src="https://pic2.helpfully.top:9522/uploads/2023/10/653939e1359e8.png" alt=""/></figure>



<figure class="wp-block-image size-large"><img decoding="async" src="https://pic2.helpfully.top:9522/uploads/2023/10/65393a20a300b.png" alt=""/></figure>



<p>大功告成。</p>



<h3 class="wp-block-heading">通过 Maintenance Tool 配置 Qt</h3>



<p>成功安装 Qt 之后，即可在安装路径下找到 Maintenance Tool 工具。与 Qt Online Installer 的界面和操作方式类似，通过 Maintenance Tool 也可以更新/添加/删除 Qt 组件。</p>



<figure class="wp-block-image size-large"><img decoding="async" src="https://pic2.helpfully.top:9522/uploads/2023/10/65393a8f84913.png" alt=""/></figure>



<p>Enjoy it~!</p>



<hr class="wp-block-separator has-alpha-channel-opacity is-style-wide"/>



<p>参考链接：</p>



<ol class="wp-block-list">
<li><a href="https://doc.qt.io/qt-6.5/get-and-install-qt.html">Get and Install Qt</a></li>
</ol>
]]></content:encoded>
					
					<wfw:commentRss>https://blog.itcrafter.net/archives/110/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
