這是歷史版本頁面 — 看 Qt (32-bit) 最新版本
Qt 到底能做什麼,寫桌面程式一定要用它嗎
寫桌面程式的人大概都遇過這種時刻:你已經會寫 C++ 或 Python,想做出一個有視窗、有按鈕、能輸入文字的應用程式,但打開編輯器之後卻不知道從哪裡開始。用 Windows 內建的工具寫,介面陽春又綁死系統;上網找範例,套件裝了一堆還是跑不起來。你只是想讓程式有個像樣的介面,卻卡在「框架怎麼選」這一步,連第一行程式碼都還沒寫。
一般人遇到這種狀況,直覺是去找「最熱門」的解決方案,但熱門不代表適合。用網頁技術包裝的框架雖然上手快,跑起來卻又肥又慢;用微軟自家的方案,換到別的系統就要重寫。這類工具的切入點其實很簡單:讓你把介面和邏輯寫一次,就能在 Windows、macOS、Linux 甚至手機上跑,不用為每個平台各寫一套。問題是,這種「寫一次到處跑」的承諾,實際用起來到底划不划算,才是你真正該關心的。
01Qt 到底是做什麼用的?
它是一套跨平台的應用程式開發框架,主要用途是建立圖形介面(GUI)應用程式。你用它寫的程式可以編譯後在 Windows、macOS、Linux、Android 和 iOS 上執行。核心語言是 C++,另外可以透過 PyQt 或 PySide 綁定用 Python 開發。它提供現成的 UI 元件、網路、資料庫、多媒體等功能,不用自己從零刻。
02用這套軟體寫程式,一定要會 C++ 嗎?
不一定。官方支援的主要語言是 C++,但 Python 開發者可以透過 PyQt 或 PySide 綁定來使用,JavaScript 開發者則可以用 QML 這種宣告式腳本語言。也就是說,如果你只會 Python,還是能做出有圖形介面的應用程式,只是底層運作還是 C++ 引擎,你寫的是綁定層的程式碼。
03它能不能拿來寫手機 App?
可以。官方資料明確指出它支援 Android 和 iOS 開發,主要透過 Qt Quick 和 QML 來設計手機介面。不過要注意,這不是那種「寫一次直接轉成原生 App」的方案,你還是要針對手機的螢幕尺寸和操作習慣調整介面,而且手機端的效能和桌面端不能一概而論。
04介面可以做成什麼樣子?
有兩條路:Qt Widgets 和 Qt Quick。Qt Widgets 是傳統桌面風格,像 Windows 那種視窗、按鈕、選單的樣式,適合工具型軟體;Qt Quick 用 QML 語言,可以做出流暢、有動畫的現代化介面,適合需要客製化視覺效果的應用。兩者可以混用,但學習路徑不同,Widgets 比較直覺,QML 需要另外學一套語法。
05它除了做介面,還有什麼內建功能?
內建模組涵蓋網路程式設計(TCP/IP)、SQL 資料庫連線、多媒體影音處理、OpenGL 3D 圖形、感測器存取、WebView 網頁顯示等。也就是說,你不必為了連資料庫或開網路連線另外找套件,框架本身就提供對應的 API。另外還有 Qt Creator 這個整合開發環境,包含語法標記、除錯器和即時設計預覽。
06什麼樣的人適合用這套軟體?
適合已經會 C++ 或 Python、想寫跨平台桌面應用的人,尤其是你的目標是 Windows 和 macOS 都要跑、但不想維護兩套程式碼的狀況。也適合做嵌入式系統或車用介面的開發者,官方資料有提到 IoT 和汽車產業的應用。如果你本來就熟悉 C++,這套框架的學習曲線會比從零學新語言平緩很多。
07我只會 Python,用這套會不會很吃力?
會比直接用 C++ 輕鬆,但不會完全無痛。PyQt 和 PySide 綁定讓你可以用 Python 語法呼叫 Qt 的功能,但官方文件很多範例是 C++ 寫的,你要自己轉換。而且 QML 這套宣告式語言還是要另外學。如果你只是要一個簡單的視窗工具,Python 搭配這套綁定是可行的;但如果你要的是高效能或複雜介面,建議還是補一下 C++ 基礎。
08什麼情況不該選這套軟體?
如果你要寫高效能遊戲,官方自己都說它比較適合一般應用程式,不適合跟 Unity 或 Unreal 那種專門的遊戲引擎比。如果你只鎖定 Windows 平台、而且用 C#,那微軟自家的 .NET 方案(WPF、WinForms、MAUI)整合度更高。另外,如果你很在意安裝檔大小,官方資料承認它做出來的應用程式比原生 Windows UI 框架肥大。
09它是免費的嗎?
有開源版本,採用 GPL 和 LGPL 授權,非商業用途可以免費使用。但如果你要開發不開源的商業軟體,就要買商業授權,官方說價格依需求而異,沒有公開定價。這點要特別注意:用開源版寫商業軟體,你的程式碼可能被迫以 GPL 授權公開,不想這樣就得付費。
10這套軟體對電腦配備的要求高嗎?
官方列出的系統需求是 Windows 10 或 11 的 64 位元系統、Intel Core i3 以上處理器、至少 4GB 記憶體(建議 8GB)、5GB 硬碟空間,以及支援 OpenGL 的顯示卡。要注意的是,官方系統需求寫的是 64 位元,你看到的這個 32 位元版本可能不是官方目前主力支援的對象,安裝前最好確認你的環境符合需求。
11它跟 Qt Creator 有什麼關係?
Qt 是框架本身,Qt Creator 是官方提供的整合開發環境(IDE),兩者是不同東西。資料裡把它們列為「功能相近」的比較對象,但實際上 Qt Creator 是用來開發 Qt 應用程式的工具,內建專案管理、程式碼編輯、除錯和 UI 設計功能。你裝 Qt 的時候可以一併安裝 Qt Creator,也可以選擇用 Visual Studio 搭配官方提供的 Add-in 外掛來開發。
12這套軟體還有人在維護嗎?
有,而且更新算頻繁。資料顯示它收錄了 48 個版本,最近 12 個月內更新了 7 次,最近 24 個月內更新了 15 次,表示開發團隊持續在維護。另外官方也推出了 AI 輔助功能,可以自動產生測試案例、文件和 QML 程式碼,支援多種 LLM 模型,顯示這個專案不是放著不管的狀態。
下載與官方連結
qt-opensource-windows-x86-msvc2015-5.8.0.exe · 1024 MB · 連結指向軟體原廠
版本紀錄
再看 5 筆
這一版改了什麼
What's new in this version:
Qt Lite:
- One of the main themes of Qt 5.8 has been to make Qt more flexible and easier to adopt to your use case, targeted especially at our embedded users. Qt Lite has been the codename of the project under which we did those changes
- Our goal has been to make it easier to configure Qt to exactly your needs and leave out features that you don’t need in your project. This brings major savings in the size of the compiled Qt libraries and thus your application
- Implementing support for this put us on a longer journey, where we rewrote most parts of the system that was being used to configure Qt. The new system cleans up a system that had grown over the last 15 years, and that also lead to many inconsistencies on how Qt was being configured on different host platforms
- As a result, we now have one unified system to configure the different parts of Qt. In addition to giving our users a lot more flexibility in configuring Qt, it will also ease our burden in supporting all the different ways Qt can be configured and used
- Using the new system allows you to create a Qt build tailored to exactly your use case. You can leave out all the features in Qt that you don’t need, saving ROM and RAM when deploying to your embedded device
Qt Wayland Compositor:
- The Qt Wayland Compositor API that we included as a Technology Preview in Qt 5.7 is now fully supported in Qt 5.8. The module makes it very easy to create your own Wayland Compositor.
- Qt Wayland Compositor make it very easy to implement your own custom home screen and application manager. This allows the creation of powerful and more complex embedded systems where you have multiple applications that have their own user interfaces. Qt Wayland Compositor supports handling multiple screens in an easy and transparent way. It comes with both QML and C++ APIs.
Communication and Networking:
- Qt Serialbus has now graduated to be fully supported in Qt 5.8. It allows you to use Qt APIs for device bus communications and protocols. While the API is rather generic, this version includes implementations for CAN and Modbus.
- Qt Network and Web Sockets gained full support for TLS PSK cyphersuites. Qt Network now supports configurable Diffie-Hellman parameters and HTTP/2 in QNetworkAccessManager.
- Qt Bluetooth gains BTLE Peripheral support on macOS and iOS as well as BTLE Central support on WinRT.
- Qt 5.8 also adds a new Qt Network Authorization module as a Technology Preview, currently supporting the OAuth 1 and 2 authentication schemes
Qt QML and Quick:
- Quite a few things have happened in Qt QML and Qt Quick. The QML engine has gained support for caching binary representations of QML and JS files on disk, reducing startup time and memory consumption of the engine. The commercial only Qt Quick compiler is still supported in 5.8, but we are planning to merge it with the new caching infrastructure in the future, leading to a better performing and more tightly integrated solution.
- The Qt Quick scene graph has undergone a larger refactoring, making it less dependent on OpenGL. This allowed us to add an experimental Direct3D 12 backend for Qt Quick, and does enable the creation of other backends e.g. based on the Vulkan graphics APIs.
- In addition, the scene graph now supports partial updates to the screen if only a small area of the scenography changed. This brings some larger performance improvements to the Qt Quick 2D renderer.
- We also used the changes to the scene graph as an opportunity to fold the functionality of the Qt Quick 2D renderer into Qt Quick directly. This implies that the Qt Quick 2D renderer does not exist as a standalone module in Qt 5.8 anymore.
- Larger changes have also been done under the hood with respect to Mouse and Touch event handling, unifying them internally in a new QQuickPointerEvent class. This lays the foundation for future improvements to mouse and touch event handling, but doesn’t affect code using Qt Quick yet.
- The Qt Quick Controls 2 have also gained a couple of new types such as dialogs, rounded buttons and tool separators. The Material and Universal styles have gained some new effects and support for a ‘system’ theme.
Qt Webengine:
- As always the Chromium version used by Qt Webengine has been updated, this time to Chromium 53. One long outstanding feature added in Qt 5.8 is the ability to print web pages. Many smaller new features have been added, amongst them a new QML API to define custom dialogs, tootips and context menus, and support for view-source: and some chrome: schemes.
Qt SCXML:
- Qt SCXML is now fully supported in Qt 5.8. The module makes is trivial to integrate SCXML based state machines into Qt. It builds directly onto the Qt Statemachine Framework, and extends it with with both a SCXML to C++ compiler and a runtime that allows loading SCXML based state machines.
- Together with the Qt SCXML module, Qt Creator 4.2 gained support for editing state charts
New Technology Previews:
- Also in Qt 5.8, we have new functionality that we chose to introduce as a Technology Preview
- Qt now compiles for both Apple’s tvOS and watchOS. While most of the functionality that we support on iOS should also work on tvOS, watchOS support is limited to the non-graphical functionality in Qt
- Qt Speech has been added as a new module adding support to text to speech functionality
Other improvements:
- After the initial release of Qt 3D with Qt 5.7, the focus for 5.8 has been on maturing the module. A large amount of bug fixes and performance improvements have been made for the module
- Qt Charts has gained a Candlestick chart type and we have made the QOpenGLTextureBlitter API in Qt Gui public
- Our embedded platforms supported by Qt for Device Creation have gained better support for multi-screen systems when using the eglfs QPA plugin and support for 90/180 degree rotated screens
- Finally, many changes happened to our code base to make better use of the new features offered by C++11 and with that clean up and modernize our code base