Skip to content

QML Modules defined in external crates don't work #1135

@akiselev

Description

@akiselev

Repro: https://github.com/akiselev/cxx-qt-module-repro

Current output:

Default MyObjectRust MyObjectRust { number: 0, string:  }
QQmlApplicationEngine failed to load component
file:///.../cxx-qt-module-repro/qml/main.qml:13:1: module "CxxQt.Repro" is not installed

@LeonMatthes said in Zulip:

  • All your crates should use CXX-Qt 0.7 (or git main)
  • All library crates need to use the CxxQtBuilder::library function
  • All library crates need to have a links key set in their Cargo.toml
  • Your main executable needs to build with a normal CxxQtBuilder::new, even if it doesn't actually need to build anything itself.

I think I've got all that covered but the repro still fails to load the module correct. In my own project, this works with CMake but not Cargo.

Metadata

Metadata

Labels

⏮️ backport-candidateChange which could be backported to the stable series🔨 build systemIssues related to integrating CXX-Qt into CMake/Cargo🪲 bugSomething isn't working

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions