Skip to content

The Difference Between Qt, QML, and Widgets

Last Updated on 2021-12-05 by Clay

According to the official documentation, for developers who are new to Qt framework, the first thing to clarify is the difference between some important terms.

For example, what is Qt? What is QML? What role does Widgets play in the Qt framework... and so on.

This note is mainly rewrote from the official documentation (the link is at the end of the article).


What is Qt?

Qt is the one of the most popular graphical interface development frameworks in the world, it is also an open source collaborative project for the development.

As a mature graphical interface development framework, Qt has many components and modules. For example, qtbase is a basic component and contains many well-known modules, such as QtCore, QtCui, QtWidgets, QtNetwork... etc., and these modules have many classes that can be called directly. For example, the QtCore module contains QFile, QTime, QByteArray... etc.

Of course developers can develop an application without any user interface, such as command-line tool, regular expression, file encoding... But if you want to make a graphical user interface, you can consider to use some classes provided by QtWidgets.


What is Widget?

QtWidgets is to provide preset widget modules. We can add preset widgets, such as buttons, labels, menus, etc., to the main window of the graphical interface we developed.

And because the Qt framework supports well-known operating systems such as Windows, MacOS, Linux, etc., in the graphical interface you can find that the appearance of the application looks similar to the native appearance of the system.


What is QML?

Different from the default components provided by Qt, QML is another system of user interface development method, and its earliest purpose is to develop applications for mobile devices.

Its modules also provide click, drag and drop, animation, conversion, drawer... and other common operations on mobile devices.

However, although its general direction is to provide a mobile device interface, developers can still apply it to desktop applications.

Tags:

Leave a ReplyCancel reply

Exit mobile version