Go to url for downloading and installed qt5 that is given bellow,
[Link]
How to install Qt Creator on Ubuntu 18.04
This tutorial was done with the following software versions:
• Ubuntu 18.04 LTS
• Qt Creator 4.5.2
• Qt 5.9.5
# Install Qt Creator
sudo apt install build-essential
sudo apt install qtcreator
If you want Qt 5 to be the default Qt version to be used when using development binaries like
qmake, install the following package:
sudo apt install qt5-default
# Install documentation and examples
If Qt Creator is installed thanks to the Ubuntu Sofware Center or thanks to the synaptic package
manager, documentation for Qt Creator is not installed. Hitting the F1 key will show you the
following message : “No documentation available”. This can easily be solved by installing the Qt
documentation:
sudo apt install qt5-doc
And eventually:
sudo apt install qt5-doc-html qtbase5-doc-html
If examples are still missing:
sudo apt install qtbase5-examples
Restart Qt Creator to make the documentation available.
• Install generic font configuration library - runtime
Open a terminal and execute the following command to install the full runtime files for the generic
font configuration library: sudo apt-get install libfontconfig1
• 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.
• Install OpenGL libraries
Execute the following command to install OpenGL libraries: sudo apt-get install mesa-
common-dev
Note: Just installing the above-mentioned mesa-common-dev kit is not sufficient for more recent
Ubuntu versions. Based on a comment in the Qt forum[1] an additional package needs installation.
Execute following command: sudo apt-get install libglu1-mesa-dev -y Tested
with Qt5.3.1 and Ubuntu 14.04 and it solved the problem with missing -lGL.
# How to run QtCreator in ubuntu 18.04.
1) open terminal (alt+ctrl+t).
2) type qtcreator and pressed enter. The QtCreator will be opened.
# Create new project
1) Click New Project tab.
Click this tab.
2) Select Qt Widget Application tab and pressed Choose button.
3) Type the name of project and browse the path where the project
will be created (By defualt “/home/<user>”). Now pressed next
button.
4) Now select kit by selecting the checkBox. Here Desktop is
available. Pressed next button.
5) Fills all input fields. If you do not want to change, keek the
defualt value and click next button.
6) Now presed Finish button.
7) To run the project, pressed green button.
Pressed this green button,
To run the project.