Ubuntu 及 Windows 系统下安装 Qt5
1. Ubuntu 安装 Qt5 命令
安装Qt5
:
1
sudo apt install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools qtmultimedia5-dev qttools5-dev qttools5-dev-tools qtcreator libqt5svg5-dev libqt5charts5 libqt5charts5-dev qtdeclarative5-dev libqt5xmlpatterns5-dev libqt5x11extras5-dev cmake-qt-gui
1
sudo apt-get -y install build-essential cmake gcc git lib32ncurses-dev lib32z1 libfox-1.6-dev libsdl1.2-dev software-properties-common wget zip python3-pip-whl python3-pil libgtest-dev python3-pip python3-tk python3-setuptools clang-14 python3-clang-14 libusb-1.0-0-dev stlink-tools openocd npm pv libncurses5:i386 libpython2.7:i386 libclang-14-dev python-is-python3
2. cmake find_package for Qt5
1
2
3
4
find_package(
Qt5
COMPONENTS Core Gui Widgets Network Svg Charts
REQUIRED)
3. 在线安装包 Qt5
同时适用于windows
/linux
平台:
下载在线安装包:Qt downloads
安装命令:
1
.\qt-unified-windows-x64-online.exe --mirror https://mirrors.ustc.edu.cn/qtproject
4. 额外链接
本文由作者按照 CC BY 4.0 进行授权