Jan 7, 2014

Ubuntu Programming Lesson 00 - Install Qt SDK (ver 5.2)

Create amazing apps: Qt, QML and HTML5 are official programming languages for developing Ubuntu Apps, including mobile Apps on Ubuntu smartphone. Let's start from installing Qt SDK 5.2.
Complete the installation of Qt SDK


The Ubuntu SDK: The first thing you’ll need to do is to install the tools and its dependencies. The installation will take place from PPAs, which are archives of packages that enable rapid delivery of updates. It’s an easy step that should take just a few minutes. Follow instructions shown in this page.
Develop Ubuntu Apps
QML is a powerful tool for programming Apps with fluent UI design style. But you must install Qt SDK first. I referred to "Qt SDK 5.0 Installation Instructions" and summarized commands with comments as followings, you must download offline version Qt SDK 5.2 for Linux 64-bit:
file /sbin/init #check Ubuntu OS version
sudo apt-get install synaptic #update & resynchronize package files from sources
sudo apt-get update               #via the Internet
sudo apt-get install qt4-dev-tools libqt4-dev libqt4-core libqt4-gui  #adds additional Qt development libraries
sudo apt-get install build-essential  #add additional C/C++ libraries for compilation
sudo apt-get install "^libxcb.*" libx11-xcb-dev libglu1-mesa-dev libxrender-dev
#add OpenGL funtionality when running your Qt applications
cd /home/nas/Downloads  #to the Downloads directory of your account "nas"
sudo -s chmod u+x qt-linux-opensource-5.2.0-x86_64-offline.run  #make the Qt SDK executable for all users
sudo -s ./qt-linux-opensource-5.2.0-x86_64-offline.run -style cleanlooks  #must be root or have superuser privelages to install the Qt SDK
sudo -s chmod -R 777 /opt/Qt5.2.0  #make  Qt SDK executable for all users
sudo -s chmod -R 777 /home/nas/.config/QtProject  #prevent error messages when you start QtCreator, stating it can not write to the /home/"your_user_name"/.config/QtProject directory
sudo -s gedit /etc/profile  #To compile Qt programs from the terminal line, add following scripts to the end of the profile
  • PATH=/opt/Qt5.2.0/5.2.0/gcc_64/bin:$PATH 
  • export PATH
qmake -version  #check the right Qt version --> you can make files in command line
QMake version 3.0
Using Qt version 5.2.0 in /opt/Qt5.2.0/5.2.0/gcc_64/lib




NOTE: Qt 5.2.0 for Android and iOS (Mac, 1.0 GB) (Info) surprises me, I can develop Android and iOS Apps with Qt 5.2.0. May be I'll install Mac OS soon.

No comments :

Post a Comment