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 속성을
  • jenny.useJniHelper 를 false로, 그리고
  • jenny.useTemplates 를 참으로 설정해야 합니다.

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

© 2025 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.