Use of sub modules in Qt/QML
Solved
QML and Qt Quick
-
Hi,
I am trying to understand why in QML (and maybe in Qt too) you have sub modules.
For example, if you look at main.qml:import QtQuick 2.9 import QtQuick.Window 2.2
Why do you explicitly need to define QtQuick.Windows as well as you already defined QtQuick ealier? Does QtQuick on itself only loads parts of the QtQuick library?
What's the use?Thanks.
-
Please note that it is software architecture. Qt is well designed with plug-and-play concept. So different functionalities in QtQuick are provided in different modules. So it our interest to include module we require. If you don't want QtQuick.Window module don't include. It is flexibility given to us. Hence the different modules.