Build Systems
CXX-Qt can be integrated into existing CMake projects or built with only cargo. The getting started guide provides documentation on how to setup your project:
CXX-Qt could work with any C++ build system so long as the QMAKE
and CXXQT_EXPORT_DIR
environment variables are set before calling Cargo,
as documented in CMake integration. However, using C++ build systems besides CMake with CXX-Qt is untested.
CxxQtBuilder
With both build systems a build script (build.rs
) file needs to be used,
so that CXX-Qt knows which files to look for bridges and to build a Qt C++ library for linking later.
See CxxQtBuilder
documentation for more details.
QML Modules
When using QML with CXX-Qt QML modules can be output.
This allows for attributes such as #[qml_element]
to register the QObject with the QML type system without any C++ code.
See QmlModule
documentation for more details.