Ade Malsasa Akbar contact
Senior author, Open Source enthusiast.
Friday, September 6, 2019 at 13:34

(Qt Creator IDE showing user interface design of a program)

Neon GNU/Linux recently gained more popularity and it is good to start Qt5 application development on it because Neon is an operating system built upon both latest Qt and KDE. With Qt5, you can create perfect and cross-platform GUI applications working on GNU/Linux and other OSes. Qt5 development here uses C++ language by default and gives you advanced user interface designer. And with Neon you can easily install and update latest Qt Software Development Kit (SDK) to support your development. This setup tutorial includes the IDE, framework (libraries), C++ compiler & debugger, complete documentation and examples, as well as other necessary programs. If last January I presented you Neon for Designers, then now is the time for Neon for Programmers. I hope this tutorial helps every new programmer in Qt. Happy hacking!


Subscribe to UbuntuBuzz Telegram Channel to get article updates directly.


About Qt


Qt or more precisely Qt Software Development Kit is a set of free software tools to create desktop applications on GNU/Linux. Qt gives you --without royalties-- the libraries, the IDE, the GUI designer, the sophisticated documentation, and a lot of professional code examples, so everybody just install it and start developing. Speaking about language, you will code in C++. Installing Qt on Neon and GNU/Linux in general will automatically install the necessary compiler and debugger as well. Great examples of software created using Qt are KDE itself, Kubuntu operating system, Calligra Office, VLC, Telegram Desktop, and many more. With Qt you can create your dream applications from simplest one to the most complex one. Qt as development platform on GNU/Linux is comparable to either VB or Delphi on Windows, that is, you can create native desktop applications with it. See its official website https://www.qt.io.

(This tutorial practiced using Qt 5.12.3, Qt Creator IDE 4.9.1, and KDE Plasma Desktop 5.16 on latest Neon GNU/Linux)

First,

Run this command line:
$ sudo apt-get install qt5-default qtcreator qtbase5-examples qtbase5-doc-html

Where:
  • It downloads no less than 120 individual packages by about 300MB data.
  • qt5-default is a metapackage that pulls out basic Qt development packages.
  • qtcreator is the Qt Creator IDE.
  • qtbase5-examples is the source code examples of Qt5.
  • qtbase5-doc-html is HTML web pages that display source code examples in Qt Creator.

Notable software installed automatically along:
  • GNU G++ Compiler
  • LLVM Clang Compiler
  • QMake build tool
  • Qt Designer
  • Qt Linguist

Second,


Run Qt Creator from start menu.


(It appears under start menu as C++ IDE for developing Qt Applications)

Third,


You can start coding by creating new project "Qt Widgets Applications" or...

(Default new project in Qt Creator creates normal GUI application)

Fourth,


...open an examples among a lot of examples available in Qt Creator.


(You can quickly learn GUI application programming just by tinkering with Qt examples provided)

Fifth,

Finally, to test running your code, simply click Run (green arrow button) or press Ctrl+R. Below is one example.

(Qt Creator IDE showing C++ source code of a program and the running application window)

Happy coding!


This article is licensed under CC BY-SA 3.0.