1. go to link : www.qt.io/download
to get a download link: http://download.qt.io/official_releases/online_installers/qt-unified-linux-x64-online.run
2.go to the directory where the above program download and input following commands in terminal to change its right:
chmod +x qt-unified-linux-x64-2.0.2-2-online.run
and then run it:
./qt-unified-linux-x64-2.0.2-2-online.run
3. install g++
sudo apt-get install build-essential
4.install libraries for OpenGL
sudo apt-get install mesa-common-dev
sudo apt-get install libglu1-mesa-dev -y
updated on 16/10/2017
https://wiki.qt.io/Install_Qt_5_on_Ubuntu