大家好,欢迎来到IT知识分享网。
1.在官网下载相关文件
下载链接:http://download.qt.io/archive/qt/
链接:https://pan.baidu.com/s/1GFO78QJu1sve_tsyQif0Og 提取码:132i
打开之后如下图所示:
选择5.8版本,进入该目录
下载安装程序时需注意,只能下载qt-opensource-linux-x64-5.8.0.run,因为只有这个是在linux环境下的安装程序
将文件通过共享文件夹挂载到ubuntu之后,在/usr/local/下创建一个名为qt的目录
之后,进入共享文件夹/mnt/hgfs/share
运行安装程序,程序如下图所示
点击Next,点击skip跳过输入邮箱步骤
之后点击Next
接下来更改程序安装目录为/usr/local/qt(自己的安装目录)
之后一直Next即可
点击install,开始安装
至此便完成了qt的安装
进入你的安装目录如果发现如下内容即为成功安装
成功安装之后,我们需要安装相应的工具,以使得程序正常运行
sudo apt-get install gcc g++
sudo apt-get install libqt4-dev
sudo apt-get install build-essential
程序全部安装完毕后,进入当前目录的/Tools/QtCreator/bin目录
终端输入:./qtcreator
接下来,进入Qt界面,创建一个简单的Qt工程
点击New Project
点击choose…,输入文件储存路径以及工程名
一直点击Next
选择QWeight,点击Next
点击finish之后便完成了工程的创建
在文件中添加如下内容之后点击左下角运行按钮,即可观察到Hello World字样的输出
免责声明:本站所有文章内容,图片,视频等均是来源于用户投稿和互联网及文摘转载整编而成,不代表本站观点,不承担相关法律责任。其著作权各归其原作者或其出版社所有。如发现本站有涉嫌抄袭侵权/违法违规的内容,侵犯到您的权益,请在线联系站长,一经查实,本站将立刻删除。 本文来自网络,若有侵权,请联系删除,如若转载,请注明出处:https://haidsoft.com/25422.html
![Ubuntu环境下安装QT5[亲测有效]插图1 Ubuntu环境下安装QT5[亲测有效]](https://img.mushiming.top/app/yundeesoft_com/bcef6a0752824710920794886f351170.jpg)
![Ubuntu环境下安装QT5[亲测有效]插图3 Ubuntu环境下安装QT5[亲测有效]](https://img.mushiming.top/app/yundeesoft_com/7e4ffc86ee7d4ccaa611771f2d06be75.jpg)
![Ubuntu环境下安装QT5[亲测有效]插图5 Ubuntu环境下安装QT5[亲测有效]](https://img.mushiming.top/app/yundeesoft_com/b20e662043684af9afd838223033a3d3.jpg)
![Ubuntu环境下安装QT5[亲测有效]插图7 Ubuntu环境下安装QT5[亲测有效]](https://img.mushiming.top/app/yundeesoft_com/5ae6d97c59594534bf06198a23ce1b50.jpg)
![Ubuntu环境下安装QT5[亲测有效]插图9 Ubuntu环境下安装QT5[亲测有效]](https://img.mushiming.top/app/yundeesoft_com/1380a644db70475393fc8c640abee420.jpg)
![Ubuntu环境下安装QT5[亲测有效]插图11 Ubuntu环境下安装QT5[亲测有效]](https://img.mushiming.top/app/yundeesoft_com/d75830b6f31a490ba38cdcd16a83c3fe.jpg)
![Ubuntu环境下安装QT5[亲测有效]插图13 Ubuntu环境下安装QT5[亲测有效]](https://img.mushiming.top/app/yundeesoft_com/9d2988c7d28d47859fef4cf9bd9fd8d6.jpg)
![Ubuntu环境下安装QT5[亲测有效]插图15 Ubuntu环境下安装QT5[亲测有效]](https://img.mushiming.top/app/yundeesoft_com/c4b65ff9a5854514bec9d81bcb966049.jpg)
![Ubuntu环境下安装QT5[亲测有效]插图17 Ubuntu环境下安装QT5[亲测有效]](https://img.mushiming.top/app/yundeesoft_com/b77c654fa99e4fcdaaee323dbf0efb75.jpg)
![Ubuntu环境下安装QT5[亲测有效]插图19 Ubuntu环境下安装QT5[亲测有效]](https://img.mushiming.top/app/yundeesoft_com/d19e4d567d9843968639a4e1401c4ed8.jpg)
![Ubuntu环境下安装QT5[亲测有效]插图21 Ubuntu环境下安装QT5[亲测有效]](https://img.mushiming.top/app/yundeesoft_com/1e9f50cb64a24eb090c96f09831eff93.jpg)
![Ubuntu环境下安装QT5[亲测有效]插图23 Ubuntu环境下安装QT5[亲测有效]](https://img.mushiming.top/app/yundeesoft_com/5b5427f02bf84653a73c63bcc0591dea.jpg)
![Ubuntu环境下安装QT5[亲测有效]插图25 Ubuntu环境下安装QT5[亲测有效]](https://img.mushiming.top/app/yundeesoft_com/1ce969329f9242e2ae00b41b005c6327.jpg)
![Ubuntu环境下安装QT5[亲测有效]插图27 Ubuntu环境下安装QT5[亲测有效]](https://img.mushiming.top/app/yundeesoft_com/c4dfee230ae74e12b59515fd9d3d1d3a.jpg)
![Ubuntu环境下安装QT5[亲测有效]插图29 Ubuntu环境下安装QT5[亲测有效]](https://img.mushiming.top/app/yundeesoft_com/422ed68575e04121ae1b6637561873e1.jpg)
![Ubuntu环境下安装QT5[亲测有效]插图31 Ubuntu环境下安装QT5[亲测有效]](https://img.mushiming.top/app/yundeesoft_com/f46454b7d1d240ce81ad3815c299ba92.jpg)
![Ubuntu环境下安装QT5[亲测有效]插图33 Ubuntu环境下安装QT5[亲测有效]](https://img.mushiming.top/app/yundeesoft_com/6e355dc99ff542939453c35129f4586e.jpg)
![Ubuntu环境下安装QT5[亲测有效]插图35 Ubuntu环境下安装QT5[亲测有效]](https://img.mushiming.top/app/yundeesoft_com/def7117c51a54477ba39135b3912e9df.jpg)
![Ubuntu环境下安装QT5[亲测有效]插图37 Ubuntu环境下安装QT5[亲测有效]](https://img.mushiming.top/app/yundeesoft_com/51ed1bc5804b4c1aad7d77a04267cb96.jpg)
![Ubuntu环境下安装QT5[亲测有效]插图39 Ubuntu环境下安装QT5[亲测有效]](https://img.mushiming.top/app/yundeesoft_com/8730a4fda7c64353a1f23c90e86b31f8.jpg)
![Ubuntu环境下安装QT5[亲测有效]插图41 Ubuntu环境下安装QT5[亲测有效]](https://img.mushiming.top/app/yundeesoft_com/1c17ccb57fb74d9fb18b6ec4a9a1b9da.jpg)
![Ubuntu环境下安装QT5[亲测有效]插图43 Ubuntu环境下安装QT5[亲测有效]](https://img.mushiming.top/app/yundeesoft_com/b2b76f7b7fe24f5abf859148f33ffd74.jpg)
![Ubuntu环境下安装QT5[亲测有效]插图45 Ubuntu环境下安装QT5[亲测有效]](https://img.mushiming.top/app/yundeesoft_com/e9de058818a548d181b8bed1c671dc51.jpg)