Accessing a singleton instance of #[qml_singleton] from Rust side #655
Unanswered
Billyzou0741326
asked this question in
Ideas
Replies: 1 comment 1 reply
-
That looks like the most appropriate way to do it from Rust. We don't have bindings for QAnyStringView yet: #629 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
As per my understanding,
qobject
s marked with#[qml_singleton]
will be generated asQML_SINGLETON
on the C++ side.Is there a way to access an instance of said singleton on the Rust side?
Looks like
QQmlEngine
exposes these methods on the C++ side (https://doc.qt.io/qt-6/qqmlengine.html#singletonInstance):Is there any existing method to access a singleton instance that I'm not aware of? If not, are there plans to support this use case?
Beta Was this translation helpful? Give feedback.
All reactions