How to install Qt Creator on Ubuntu 16.04. Qt Creator 4.1 is released with editor improvements, an improved CMake support and new themes. Qt is a cross-platform application development framework for desktop, embedded and mobile.
Qt is not a programming language by its own. It is a framework written in C++. A preprocessor, the MOC (Meta-Object Compiler), is used to extend the C++ language with features like signals and slots.
- Qt brings its own qmake. It is a cross-platform frontend for platform-native build systems, like GNU Make, Visual Studio and Xcode.
- Qt comes with its own Integrated Development Environment (IDE), named Qt Creator. It runs on Linux, OS X and Windows and offers intelligent code completion, syntax highlighting, an integrated help system, debugger and profiler integration and also integration for all major version control systems (e.g. git, Bazaar)
With Qt, GUIs can be written directly in C++ using its Widgets module. Qt also comes with an interactive graphical tool called Qt Designer which functions as a code generator for Widgets based GUIs. Qt Designer can be used stand-alone but is also integrated into Qt Creator.
Install Qt on Ubuntu
Visit Qt downloads page an download a 32-bit or 64-bit Linux installation depending your version of Ubuntu. The installation file can be also downloaded through the command line using wget.
Example:
wget http://download.qt.io/official_releases/qt/5.7/5.7.0/qt-opensource-linux-x64-5.7.0.run
Now adjust permission, run the installer and follow the instruction to complete the installation.
chmod +x qt-opensource-linux-x64-5.7.0.run
./qt-opensource-linux-x64-5.7.0.run
Configure a compiler
Launch Qt Creator. Go to Tools > Options. Click Build & Run and select tab Kit. Configure a compiler if it is not automatically detected.
Troubleshooting
Qt Creator needs a compiler set up to build. Follow the instruction from the previous section to configure compiler for Qt Creator.
error: g++: Command not found
Solution:
sudo apt-get install build-essential
error: GL/gl.h: No such file or directory
Solution:
sudo apt-get install mesa-common-dev