Introduction
Qt (pronounced “cute”) is a full-stack toolkit and system which is used to design and create modern user interfaces as well as the backend applications. Qt is a cross-platform system, so applications can be developed with any major development environments, and they run on all various different target platforms, such as Linux, Windows, macOS, Android or any embedded systems.
Qt is currently being developed by The Qt Company, a publicly listed company, and the Qt Project under open-source governance, involving individual developers and organizations working to advance Qt. Qt is available under both commercial licenses and open-source GPL 2.0, GPL 3.0, and LGPL 3.0 licenses. (1)
Qt characteristics
- Loose coupling of UI and backend
- Cross-platform with one codebase
- Scalability from MCUs to powerful desktops
- 2D and 3D in same environment
- Multiple operating system support for development and design
- End-to-end delivery mechanism
- Mature and reliable platform
- Extensive internationalization support
- Intelligent observer pattern done with signals and slots
- Dual licensing model, Qt Company and Qt Project
Qt is used for developing graphical user interfaces (GUIs) and multi-platform applications that run on all major desktop platforms and most mobile or embedded platforms. Most GUI programs created with Qt have a native-looking interface, in which case Qt is classified as a widget toolkit. Non-GUI programs can also be developed, such as command-line tools and consoles for servers. An example of such a non-GUI program using Qt is the Cutelyst web framework. Qt supports various compilers, including the GCC C++ compiler, the Visual Studio suite, PHP via an extension for PHP5,[15] and has extensive internationalization support. Qt also provides Qt Quick, that includes a declarative scripting language called QML that allows using JavaScript to provide the logic. With Qt Quick, rapid application development for mobile devices became possible, while logic can still be written with native code as well to achieve the best possible performance. Other features include SQL database access, XML parsing, JSON parsing, thread management and network support.
Qt is built on these key concepts: Complete abstraction of the GUI
When first released, Qt used its own paint engine and controls, emulating the look of the different platforms it runs on when it drew its widgets. This made the porting work easier because very few classes in Qt really depended on the target platform; however, this occasionally led to slight discrepancies where that emulation was imperfect. Recent versions of Qt use the native style APIs of the different platforms, on platforms that have a native widget set, to query metrics and draw most controls, and do not suffer from such issues as often. On some platforms like KDE, Qt is the native API. Some other portable graphical toolkits have made different design decisions; for example, wxWidgets uses the toolkits of the target platform for its implementations. (1)
Qt and Qt Quick differences
Qt also provides Qt Quick, that includes a declarative scripting language called QML that allows using JavaScript to provide the application logic. With Qt Quick, rapid application development for mobile devices became possible, while logic can still be written with native code as well to achieve the best possible performance. Other features include SQL database access, XML parsing, JSON parsing, thread management and network support.
For advanced users
Signals and slots
- A language construct introduced in Qt for communication between objects which makes it easy to implement the observer pattern while avoiding boilerplate code. The concept is that GUI widgets can send signals containing event information which can be received by other controls using special functions known as slots. (1)
Metaobject compiler
- The metaobject compiler, termed moc, is a tool that is run on the sources of a Qt program. It interprets certain macros from the C++ code as annotations, and uses them to generate added C++ code with meta information about the classes used in the program. This meta information is used by Qt to provide programming features not available natively in C++: signals and slots, introspection and asynchronous function calls. (1)
Language bindings
- Qt can be used in several programming languages other than C++, such as Python, Javascript, C# and Rust via language bindings; many languages have bindings for Qt 5 and bindings for Qt 4. The Ring programming language includes Qt in the standard library. (1)
The links to the used literal sources:
- https://en.wikipedia.org/wiki/Qt_%28software%29 (5.5.2021)
- https://en.wikipedia.org/wiki/Widget_toolkit (5.5.2021)
- https://en.wikipedia.org/wiki/Rendering_(computer_graphics) (5.5.2021)