赞
踩
一、下载
Index of /archive/qt/5.12/5.12.8
linux下载.run即可
二、安装
1.下载完成后在终端打开下载的路径
2.赋予执行权限 并执行
sudo chmod +x qt-opensource-linux-x64-5.12.8.run
./qt-opensource-linux-x64-5.12.8.run
3..之后的步骤与Windows下安装一致
三、命令行安装(可选)
除了直接下载.run文件安装外,还可以直接使用apt命令行来安装Qt,通常使用在开发版测试环境中
1.安装Qt的基本库与IDE
sudo apt-get install qt5-default
sudo apt-get install qtcreator
2.安装qmake Cmake
sudo apt-get install qt5-qmake
sudo apt install cmake
3.安装g++,gcc
sudo apt install g++ gcc
4.安装QtQucik库 用来开发qml页面
sudo apt-get install qtdeclarative5-dev
5.安装QMLmodule
sudo apt install qml-module-qtquick-controls2
6.安装QtMultimedia库
sudo apt-get install qtmultimedia5-dev
sudo apt-get install libqt5multimedia5-plugins
7.其他开发库
sudo apt install qml-module-qtquick-extras
sudo apt install qml-module-qt-labs-platform
8.编译安装mqtt
cd /home/linaro/kaifa
git init
git clone git://code.qt.io/qt/qtmqtt.git
git branch -a
cd qtmqtt/
git checkout origin/5.15.2
qmake
make -j8
等待编译完成后安装
make install
9.编译QtLocation 解决Unknown module(s) in QT: location-private positioning-private
cd /home/linaro/kaifa
git init
git clone git://code.qt.io/qt/qtlocation.git
git branch -a
cd qtlocation/
git checkout origin/5.15
mkdir build
cd build
sudo apt install qtbase5-private-dev qtdeclarative5-private-dev
qmake ../qtlocation.pro
make -j8
等待编译完成后安装
make install
10.位置定位相关
sudo apt install qtbase5-private-dev
sudo apt install qtlocation5-dev qtpositioning5-dev
apt-get install qtbase5-examples
1.在qt的pro文件缺少Qt+=的模块时 需要源码编译或使用命令直接安装
直接安装:
sudo apt install qtwebengine5-dev
sudo apt install libqt5webview5-dev
下载源码编译:安装mqtt
2.在qml中import导入的包可以直接使用命令下载
apt-get install qml qmlscene
apt-get install qtdeclarative5-dev
apt -y install qml-module-qtquick-controls
apt -y install qml-module-qtquick-controls2
apt install qml-module-qtquick-dialogs
apt install qml-module-qtquick-shapes
apt install qml-module-qt-labs-folderlistmodel
apt install qml-module-qt-labs-settings
sudo apt install qml-module-qtwebengine
sudo apt install qml-module-qtwebview
sudo apt install qml-module-qtwebchannel
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。