zoukankan      html  css  js  c++  java
  • [Installation] Qt5 installation and path configuration

    Installation

    $ chmod +x qt-opensource-linux-x64-5.7.0.run 
    $ ./qt-opensource-linux-x64-5.7.0.run

    Path Configuration

    Set default used version of Qt / qmake by replacing Default Qt version paths in:  

    /usr/lib/x86_64-linux-gnu/qtchooser/default.conf

    or in newer releases

    /usr/lib/x86_64-linux-gnu/qt-default/qtchooser/default.conf:
    /opt/Qt5/bin
    /opt/Qt5/lib

    Check by:

    $ qtchooser -print-env

    QtCreator Path Configuration

    What we need here is only to put a soft link to the qtcreator we have just installed. Here are some simple precedures.

    1. Once the Qt program is installed, open up a terminal and use a text editor such as nano or gedit to edit your /etc/profile.
      • Type/Copy/Paste: sudo -s nano /etc/profile
      • or
      • Type/Copy/Paste: sudo -s gedit /etc/profile
    2. Scroll down to the end of the /etc/profile file and enter the following text below. You want to add this line below to your /etc/profile system wide file so that you will have the option to compile Qt programs from the terminal line.
    3. Type/Copy/Paste:
      export PATH=/opt/Qt5.7.0/Tools/QtCreator/bin:$PATH
    4. The above number highlighted in bold denotes the version number of the Qt SDK so make sure you enter the correct version number of the Qt SDK. The Qt SDK is always improving with new version changes. So make sure you are mindful of your Qt SDK version number.
      • For example, we are using Qt version 5.7.0 in this example, therefore the version number in the /etc/profile would reflect as 5.7.0
    5. Save the /etc/profile file and exit
    6. Reload the /etc/profile file by issuing the following command
      • Type/Copy/Paste: . /etc/profile
      • Make sure you enter a . and then a space in order to reload your /etc/profile file
    7. Once the /etc/profile file is reloaded issue the following command you can type the following commands to make sure your Ubuntu Linux system recognizes that the Qt SDK has been accepted by the system PATH.
    8. Type/Copy/Paste: which qmake
      • You should receive a response such as the one below
      • /opt/Qt5.7.0/Tools/QtCreator/bin/qtcreator
    9. Also type the following command below:
      • Type/Copy/Paste: qtcreator -version
    10. You should receive a response similar to this:
      • Qt Creator 4.0.2 based on Qt 5.7.0
    11. This lets you know that you are able to run qtcreator programs from the command line.

    Reference

  • 相关阅读:
    c#基于业务对象的筛选
    SQLServer索引调优实践
    C#中抽象类和接口的区别
    c#基础(2) 理解委托和事件
    建议学习jQuery的步骤!
    SQL SERVER存储过程调用存储过程并接收输出参数或返回值的方法
    ASP.NET基于JQUERY的高性能的TreeView
    GetManifestResourceStream得到的Stream是null的解决
    Using GDI+ on Windows Mobile 初体验
    提供一个Windows mobile Native UI 程序,循序渐进开发,并附有代码!
  • 原文地址:https://www.cnblogs.com/casperwin/p/6247767.html
Copyright © 2011-2022 走看看