이 페이지에서

Qt Jenny 구성

래퍼가 생성될 Java 클래스 선택

코드 생성 프로젝트의 소스 파일 내 GenerateCppCode Kotlin 클래스 상단에 해당 클래스에 대한 Kotlin import 문과 NativeProxyForClasses 어노테이션을 추가하여 C++ 코드를 생성할 Java 클래스를 선택합니다. QtJenny 데모에는 이러한 방식으로 작성된 어노테이션 예시가 있습니다.

코드 생성 구성

코드 생성기에는 프로젝트 구조에 맞춰 조정하는 데 유용한 몇 가지 구성 매개변수가 있습니다:

  • jenny.outputDirectory, 코드가 생성되는 ` output ` 디렉터리입니다. ` Qt Jenny `는 지정된 디렉터리 내의 `jenny/proxy` 디렉터리 아래에 생성된 파일을 추가합니다.
  • jenny.templateDirectory, template 디렉터리로, 코드 생성에 사용되는 템플릿이 이 디렉터리에서 로드됩니다.

이 외에도 Qt Jenny 프로젝트에서는 다음 속성을

  • jenny.headerOnlyProxy 를 true로,
  • jenny.useJniHelper false로,
  • jenny.useTemplates true로 설정해야 합니다.

이러한 플래그와 그 기본값은 Qt Jenny 가 원래 포크된 프로젝트와의 하위 호환성을 지원하기 위해 존재합니다. 즉, Qt Jenny 를 구성하여 원본 프로젝트와 동일한 방식으로 코드를 생성할 수 있습니다. 그러나 권장되는 방법은 QJniObject 를 사용하는 템플릿을 통해 코드를 생성하는 것입니다.

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.