- Qt 6.9
- Qt Jenny configuration
- Qt 6.9.3 Reference Documentation

# Qt Jenny configuration

## Selecting which Java classes wrappers are generated for

You select the Java classes you want to generate C++ code by adding the Kotlin import statements and `NativeProxyForClasses` annotations for those classes at the top of the `GenerateCppCode` Kotlin class, in the source file in the code generation project. The QtJenny Demo has example annotations done this way.

## Configuring the code generation

The code generator has a couple of configuration parameters that are useful to adjust for your project structure:

- `jenny.outputDirectory`, the `output` directory, where the code is generated. Qt Jenny will add the generated files under the specified directory, under the jenny/proxy directory.
- `jenny.templateDirectory`, the `template` directory, from which the templates used for the code generation are loaded.

In addition to this, Qt Jenny projects need to set the properties

- `jenny.headerOnlyProxy` to true,
- `jenny.useJniHelper` to false, and
- `jenny.useTemplates` to true.

These flags, and their defaults thereof, are there to support backwards-compatibility with the project Qt Jenny was originally forked from. This means that Qt Jenny can be configured to generate code the same way as the original project did. The recommended way is, however, to generate code using templates that use QJniObject.