Ever since Qt 5.6, Qt Quick Controls 2 has been released to replace version 1, which is known to have performance issues and technical problems, which led to its deprecation. With Qt Quick Controls 2, everything has been rebuilt from scratch with performance in mind. Qt Quick Controls 2 not only run smoothly on PC, but also mobile and embedded devices.
To use Qt Quick Controls 2 in your project, perform the following steps:
- Add the following module to your QML file:
import QtQuick.Controls 2.12
- If you somehow need to use Qt Quick Control 2 in your C++ code, you must first add the quickcontrols2 module to your qmake project file:
QT += quickcontrols2
- After that, you may include the QtQuickControls2 header in your C++ source code:
#include <QtQuickControls2>
Following are some of the QML Types available under Qt Quick Control 2...