pub struct QtToolMoc { /* private fields */ }Expand description
A wrapper around the moc tool
Implementations§
Source§impl QtToolMoc
impl QtToolMoc
Sourcepub fn new(qt_installation: &dyn QtInstallation, qt_modules: &[String]) -> Self
pub fn new(qt_installation: &dyn QtInstallation, qt_modules: &[String]) -> Self
Construct a QtToolMoc from a given QtInstallation
Sourcepub fn compile(
&self,
input_file: impl AsRef<Path>,
arguments: MocArguments,
) -> MocProducts
pub fn compile( &self, input_file: impl AsRef<Path>, arguments: MocArguments, ) -> MocProducts
Run moc on a C++ header file and save the output into cargo’s OUT_DIR. The return value contains the path to the generated C++ file, which can then be passed to cc::Build::files, as well as the path to the generated metatypes.json file, which can be used for QML modules.