美文网首页
QT4 QT与Creator的安装(Ubuntu 14)

QT4 QT与Creator的安装(Ubuntu 14)

作者: QingLinger | 来源:发表于2017-03-12 16:52 被阅读0次
  1. 依赖安装。
    sudo su
    apt-get install g++
    apt-get install libX11-dev libXext-dev libXtst-dev
    apt-get install build-essential
    apt-get install libgl1-mesa-dev
  • qt安装。
    下载qt-everywhere-opensource-src-4.8.5.tar.gz。其他版本下载:download.qt..io
    tar xvzf qt-everywhere-opensource-src-4.8.5.tar.gz
    cd qt-everywhere-opensource-src-4.8.5
    ./configure --prefix=/opt/qt-4.8.5
    //下面选择o,yes
    make -j4 && make install -j4
    卸载参考:QT 卸载(Ubuntu 14)
  • qtcreator安装。
    下载qtcretor。选择.bin文件下载,如qt-creator-linux-x86_64-opensource-2.5.2.bin。
    chmod +x qt-creator-linux-x86_64-opensource-2.5.2.bin
    ./qt-creator-linux-x86_64-opensource-2.5.2.bin
  • Creator上配置QT。

搜索qt并打开Creator ->



Tools -> Options ->


Build & Run -> Qt Version -> Add... -> /opt/qt-4.8.5/bin ->qmake -> Open -> OK



修改环境变量。
sudo gedit /etc/bash.bashrc


  • qt运行报错。

Error while building/deploying project newLingerPlayer (target: Desktop)
When executing step 'qmake'
解决方法:点击qt creator左侧projects栏,在General栏的build directory内重新加载一下该工程的xxx-build-desktop-Qt_xxx_Qt_xxx_Debug。(默认该部分为灰色非使能,点击下面的import exiting build即可使能。)


参考: qt creator报错error while building deploying project
  • 完成。

注:参考 从零开始移植QT4.8.5之二--在linux下安装QT

相关文章

网友评论

      本文标题:QT4 QT与Creator的安装(Ubuntu 14)

      本文链接:https://www.haomeiwen.com/subject/tptxnttx.html