EN | RU

Demo QtBindings

To clone the project, git-lfs is required.

The project demonstrates a multiplatform library using QtBindings with applications for Aurora OS (Qt) and Desktop (JVM/Compose Multiplatform).

Contents

  • Multiplatform KMP library with shared logic
  • Desktop application (Compose Multiplatform)
  • Aurora OS application (Qt/QML)
  • Project structure using independent subprojects (includeBuild)
  • Automatic synchronization of KMP artifacts to Qt and JVM projects
  • Root-level Gradle tasks for build orchestration
  • Code formatting with Spotless

Demonstrated Features

  • Platform detection: expect/actual mechanism for platform name (getTitle)
  • Synchronous calls: retrieving shared state (DemoState.increment)
  • Asynchronous calls: suspend functions with delays (increase)
  • Error handling: exceptions from Kotlin coroutines caught in the host application
  • Cancellation: graceful termination of long-running operations

Running the Desktop Application

From the project root:

./gradlew runAppDesktop

This will build the shared JVM artifacts and launch the Compose Multiplatform application.

Running the Aurora OS Application

From the project root:

./gradlew hintAuroraRun

This will build the shared native artifacts (.so, headers, .pro files) and print instructions for launching the Qt application in Aurora IDE.

Documentation

You can read more about QtBindings in the official documentation.