How to Install Qt 5 Development Tools in Linux

When starting Qt 5 application development in Linux it is necessary to first install Qt 5 development tools. Qt Creator is the IDE used to develop Qt applications. In order for Qt Creator to be able to build Qt applications, library files, header files and a C++ compiler must be installed.

Part 2 of the Qt Creator C++ Tutorial

Go to the Qt Programming Tutorial Series Table of Contents

This article shows how to install the necessary packages for Qt 5 application development. It was tested on a Linux Mint 18 Mate 64-bit computer, but should work on other Debian based Linux distributions such as Ubuntu and other Linux Mint versions.

Update November 2019: The installation was tested on Linux Mint 19.2 Cinnamon and MATE.

Install Qt Creator

Qt Creator is an IDE for Qt GUI and C++ code development. It is used to graphically lay out windows and widgets for GUI applications and to edit C++ code.

Qt Creator
Qt Creator

Install Qt Creator using the following command in a terminal window.

sudo apt-get install qtcreator

Install Qt 5 Libraries, Header Files and Tools

Qt Creator needs Qt 5 libraries, header files and software utility tools to be installed. Without these packages Qt applications would not be able to be compiled. All the necessary packages can be installed by running the following command in a terminal window.

sudo apt-get install qtdeclarative5-dev

Install a C++ Compiler

Finally a C++ compiler must be installed on the system. Qt development is done in C++ in Qt Creator. Applications will not be able to be compiled without a C++ compiler installed. Run the following command to install the g++ C++ compiler

sudo apt-get install g++

With the above packages installed, you are ready to begin developing Qt 5 applications using Qt Creator. You may like to try the Qt 5 Hello World tutorial to start learning how to use Qt Creator to make a simple GUI application.

6 thoughts on “How to Install Qt 5 Development Tools in Linux”

  1. In Linux mint 18, cinnamon, 64 bit, “no valid kits found” gets displayed for a widgets application. All the above commands were successfully installed. Help please!

    1. @peter, Post a screenshot of Tools>Options>Kits . First, click on “Desktop” though if that option is there on the Kits screen. Take a screenshot of each tab starting with “QT Versions”. I’m getting a “No QML Scene Installed” error myself under the “Qt Versions” and also had to install QMake separately for no apparent reason.

    2. I think that I figured out what this problem is and how to fix it. The same no valid kits found message appeared after I installed Qt Creator using the first install instruction, and then started Qt Creator before installing qtdeclarative5-dev. It appears that Qt Creator then looks for kits, but can’t find any. If qtdeclarative5-dev is installed before running Qt Creator for the first time, this problem does not occur.

      If qtdeclarative5-dev is installed after starting Qt Creator for the first time, then the no valid kits found problem does not go away. I solved this problem on one of my computers, but it was some time back. If I remember correctly, I deleted one of Qt Creator’s hidden folders from my home directory. It might have been ~/user/.config/QtProject but it may have been something else, possibly from the .cache folder in the home directory.

Leave a Reply

Your email address will not be published. Required fields are marked *