Say we have installed qt programs and we want to run qtcreator from the command line.

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:
    • PATH=/opt/Qt5.7.0/Tools/QtCreator/bin:$PATH
    • export 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 qtcreator
    • 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.

最新文章

  1. 【原创】开源.NET排列组合组件KwCombinatorics使用(一)—组合生成
  2. jquery根据name属性查找
  3. Linux LVM硬盘管理及LVM扩容
  4. 条件随机场理论分析CRF(Conditional Random Field)
  5. HTTP 超时
  6. python mysql 更新和插入数据无效
  7. 使用clone( )和Cloneable接口
  8. 深入.NET框架 项目--魔兽登录系统
  9. UVa 10054 The Necklace【欧拉回路】
  10. 说一说MVC的CompressActionFilterAttrubute(五)
  11. 初学Kafka工作原理流程介绍
  12. qtpy.PythonQtError: No Qt bindings could be found
  13. 使用VS Code调试Node
  14. 20145326蔡馨熤《网络对抗》—— Web基础
  15. 给Ubuntu18.04安装mac os主题<转载>
  16. C#中的HashSet, HashTable, Dictionary的区别【转】
  17. 使用tk.mybatis快速开发curd
  18. en_e outtest2
  19. PHP 抽象类和接口区别
  20. hadoop进阶----hadoop经验(一)-----生产环境hadoop部署在超大内存服务器的虚拟机集群上vs几个内存较小的物理机

热门文章

  1. Add baidu map in your website (wordpress)
  2. 文本框textarea实时提示还可以输入多少文字
  3. struts2上传
  4. 再谈自主开发与企业IT管理
  5. Ecshop后台订单列表增加”商品名”检索字段
  6. [HTML]JS添加表格
  7. Quick-cocos2d-x v3.3 SocketTCP链接(转)
  8. tomcat集群session共享
  9. PHP下的购物车
  10. HDU(2255),KM算法,最大权匹配