Create hello.pro:
QT += widgets
SOURCES = main.cpp
TARGET = hello
CONFIG += c++17
Create main.cpp:
#include <QApplication> #include <QLabel>
int main(int argc, char *argv[]) QApplication app(argc, argv); QLabel label("Hello from Qt 5.15.2 offline!"); label.show(); return app.exec();qt-opensource-windows-x86-5.15.2.exe
Build:
qmake hello.pro
nmake release (for MSVC)
mingw32-make (for MinGW)
Run release\hello.exe.
Success! You are now running an application built from the famous offline installer. qt-opensource-windows-x86-5
This is crucial. The installer presents a tree view. Here’s a recommended selection:
Expand “Qt 5.15.2”
MSVC 2019 32-bit (if you use Visual Studio)MinGW 8.1.0 32-bit (if you prefer GCC on Windows)MSVC 2017 32-bit (only if legacy toolchain required)Qt WebEngineQt Charts (optional)Qt Data Visualization (optional)Sources (recommended for debugging Qt internals)Qt LTS items – requires commercial license.Expand “Developer and Designer Tools”
Qt Creator 4.14.2 (last version fully compatible with Qt 5.15.2)MinGW 8.1.0 toolchain (if you didn’t install MSVC)Debugging Tools for Windows (if using MSVC)CMake 3.18.5 (optional, if transitioning to CMake)When you run this executable, you will be prompted to log into a Qt account. You do not need to log in for open-source versions 5.15.2 and earlier. Create main
Qt > Qt 5.15.2 tree and select MinGW 8.1.0 32-bit or MSVC2019 32-bit, depending on your compiler.