<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Qt on 随记</title><link>https://blog.liuyi2026.asia/zh/tags/qt/</link><description>Recent content in Qt on 随记</description><generator>Hugo</generator><language>zh</language><lastBuildDate>Sat, 19 Apr 2025 15:58:12 +0800</lastBuildDate><atom:link href="https://blog.liuyi2026.asia/zh/tags/qt/index.xml" rel="self" type="application/rss+xml"/><item><title>qt学习</title><link>https://blog.liuyi2026.asia/zh/docs/technology/cpp/qt/</link><pubDate>Sat, 19 Apr 2025 15:58:12 +0800</pubDate><guid>https://blog.liuyi2026.asia/zh/docs/technology/cpp/qt/</guid><description>&lt;h1 id="建议版本">建议版本&lt;a class="anchor" href="#%e5%bb%ba%e8%ae%ae%e7%89%88%e6%9c%ac">#&lt;/a>&lt;/h1>
&lt;ul>
&lt;li>Qt 4.8.7 官方推荐的 MinGW 版本为 4.4.x，但是MinGW4.4没法编译，MinGW4.5才行，然后找不到MinGW4.5，这里使用了MinGW4.8。qtCreator配套推荐3.0.1(也可以用3.5.0)&lt;/li>
&lt;/ul>
&lt;h1 id="下载视频所用版本">下载(视频所用版本)&lt;a class="anchor" href="#%e4%b8%8b%e8%bd%bd%e8%a7%86%e9%a2%91%e6%89%80%e7%94%a8%e7%89%88%e6%9c%ac">#&lt;/a>&lt;/h1>
&lt;pre tabindex="0">&lt;code>- perl--&amp;gt; https://strawberryperl.com/download/5.16.3.1/strawberry-perl-5.16.3.1-32bit-portable.zip
- MinGW(4.8.1): https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/4.8.1/threads-posix/sjlj/i686-4.8.1-release-posix-sjlj-rt_v3-rev2.7z/download (兼容windowsXP)
- (推荐)https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/4.8.2/threads-posix/dwarf/ （新版win7以上)
=====qt 4.8.7========
- qt库(带MinGW和qtCreator) ：https://download.qt.io/new_archive/qt/4.8/4.8.7/qt-opensource-windows-x86-mingw482-4.8.7.exe
- qt库(源码)： https://download.qt.io/new_archive/qt/4.8/4.8.7/qt-everywhere-opensource-src-4.8.7.zip
- qtCreator: https://qt.mirror.constant.com/archive/qtcreator/3.0/3.0.1/qt-creator-opensource-windows-x86-3.0.1.exe
===弃用===
- MinGW(4.4): https://www.123912.com/s/u5pSjv-32uAH?提取码:M27Z 
	- 要记得设置环境变量
- qt库： https://download.qt.io/archive/qt/4.7/qt-win-opensource-4.7.0-mingw.exe 
- Qt Creator： https://download.qt.io/archive/qtcreator/2.0/qt-creator-win-opensource-2.0.1.exe 
====使用5.0.2====
qt+mingw--&amp;gt; https://download.qt.io/archive/qt/5.0/5.0.2/qt-windows-opensource-5.0.2-mingw47_32-x86-offline.exe
源码--&amp;gt; https://download.qt.io/archive/qt/5.0/5.0.2/single/qt-everywhere-opensource-src-5.0.2.zip
=====在线版5.15======
https://mirrors.tuna.tsinghua.edu.cn/qt/official_releases/online_installers/qt-online-installer-windows-x64-online.exe
- .\qt-online-installer-windows-x64-online.exe --mirror https://mirrors.ustc.edu.cn/qtproject 
- Archive中选择5.15及6.8
- 安装内容：MinGW,Android,QtCharts,QtMultimedia,QtQuich3D,QtShaderTools
=====其他=======
- qt库(带MinGW和qtCreator)： https://download.qt.io/new_archive/qt/5.2/5.2.1/qt-opensource-windows-x86-mingw48_opengl-5.2.1.exe&lt;/code>&lt;/pre>&lt;h1 id="编译静态编译的qmake">编译静态编译的qmake&lt;a class="anchor" href="#%e7%bc%96%e8%af%91%e9%9d%99%e6%80%81%e7%bc%96%e8%af%91%e7%9a%84qmake">#&lt;/a>&lt;/h1>
&lt;ul>
&lt;li>下载源码&lt;/li>
&lt;li>路径不能有奇奇怪怪的符号（.-_ 之类）&lt;/li>
&lt;li>(弃)修改 &lt;code>E:\Qt\qtSrc\qtbase\mkspecs\win32-g++\qmake.conf&lt;/code>,修改&lt;code>QMAKE_LFLAGS = -static -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc&lt;/code>(仅添加&lt;code>-static&lt;/code>)&lt;/li>
&lt;/ul>
&lt;h2 id="目录结构">目录结构&lt;a class="anchor" href="#%e7%9b%ae%e5%bd%95%e7%bb%93%e6%9e%84">#&lt;/a>&lt;/h2>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-shell" data-lang="shell">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">#mkdir &amp;#34;E:\Qt\qtCustom487\buildQtStatic&amp;#34; #/p&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>mkdir &lt;span style="color:#e6db74">&amp;#34;E:\Qt\qtCustom\buildQtStatic&amp;#34;&lt;/span> &lt;span style="color:#75715e">#/p&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">#mkdir &amp;#34;E:\Qt\qtCustom487\qtStatic&amp;#34; #/p&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>mkdir &lt;span style="color:#e6db74">&amp;#34;E:\Qt\qtCustom\qtStatic&amp;#34;&lt;/span> 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">#mkdir &amp;#34;E:\Qt\qtCustom487\qtSrc&amp;#34; #/p&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>mkdir &lt;span style="color:#e6db74">&amp;#34;E:\Qt\qtCustom\qtSrc&amp;#34;&lt;/span> 
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e">#E:\Qt\qtCustom下&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>				- buildQtStatic &lt;span style="color:#75715e">#(新建的)编译时切换到这个目录&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>				- qtSrc &lt;span style="color:#75715e">#源码&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>				- qtStatic &lt;span style="color:#75715e">#(新建的)install目录&lt;/span>&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="静态编译">静态编译&lt;a class="anchor" href="#%e9%9d%99%e6%80%81%e7%bc%96%e8%af%91">#&lt;/a>&lt;/h2>
&lt;p>我用的是视频0087集的办法，也可以用 &lt;code>https://www.cnblogs.com/atggg/p/16878575.html&lt;/code>试试&lt;/p></description></item></channel></rss>