Module: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
(Created page with "== General Definition == A module can be defined as a set of C++ header files, classes, build system specific files and other content. The other files may include QML files wh...")
 
 
Line 10: Line 10:


== Making a New Module ==
== Making a New Module ==
Please see this page: <nowiki>https://wiki.qt.io/Creating_a_new_module_or_tool_for_Qt</nowiki>
Please see [[Creating a new module or tool for Qt]].

Latest revision as of 01:00, 13 August 2021

General Definition

A module can be defined as a set of C++ header files, classes, build system specific files and other content. The other files may include QML files which can re-used as components, and may accompany a qmldir file describing type information, and if applicable, shared libraries that the types depend upon. They are sets of files.

Modules in Qt are different from C++ modules, which are described here: https://en.cppreference.com/w/cpp/language/modules

Re-Using Modules

In a Qt installation on GNU/Linux, with the prefix “/Qt/6.2.0/gcc_64”, there will be module specific files for the ‘QtQuick’ directory contained within ‘qml’, ‘lib’ and ‘include’ under the prefix.

At build time, modules are used by using certain header files in source code, and by linking to shared libraries bearing the name of the module. There are module specfic scripts for CMake under ‘lib/cmake’ inside the installation prefix. These scripts provide variables which contain paths to the module directories, as well as the relevant libraries and options to consume a module.

Making a New Module

Please see Creating a new module or tool for Qt.