GitHub Action
Install Qt5/Qt6 (yaqti)
yaqti
is a basic unofficial CLI Qt installer; designed to keep things as stupid as possible. It lets you install different Qt5 and Qt6 versions with optional modules such as QtCharts, QtNetworkAuth ect all in a single command,
# install yaqti
pip install yaqti
# install Qt!
python -m yaqti install --os windows --platform desktop --version 6.2.0 --modules qtcharts qtquick3d
, optionally the --set-env
can be specified. This sets Qt5_DIR
/Qt6_DIR
so CMake can find the installation.
It can also be used as a github action,
- name: Install Qt
uses: WillBrennan/yaqti
with:
version: '6.2.0'
host: 'linux'
target: 'desktop'
modules: 'qtcharts qtwebengine'
. By default, the github-action will set the enviroment variables for Qt and install Qt dependencies. For a real-world example visit disk_usage, the project this was made for.
The version of Qt to install, for example 6.2.0
or 5.15.2
. It checks the version is valid.
The operating system you'll be running on linux
, windows
, or mac
.
The platform you'll be building for, desktop
, winrt
, android
, or ios
.
The optional Qt modules to install such as, qtcharts
, qtpurchasing
, qtwebengine
, qtnetworkauth
, qtscript
, debug_info
.
The directory to install Qt in, it will put it in a version
sub directory. By default if you install --version=5.15.2
it will install qt into ./qt/5152
.
I've had issues with other CLI installers in the past,
- They'll silently fail to download a module if you type
qcharts
instead ofqtcharts
- This fetches module and addon configurations directly from the Qt Archive, new modules and versions will appear without the tool updating!
- It keeps module names the same between Qt5 and Qt6 despite Qt moving them around a bit.
- I like to keep things stupidly simple!
Qt provides the Qt Archive, this script simply works out what 7zip files to fetch and unpacks them to the specified installation directory. Then if you want, it sets the enviroment variable so CMake can find the install.