Details
-
Task
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
Description
Why?
Cause
- Java/Kotlin Android developers (users of QtQuickView) cannot interact with QML singletons (objects defined with pragma Singleton in QML) through the Java/Kotlin interface.
- Singletons are critical for managing global states or utilities in QML applications, and the lack of direct support limits their usability in hybrid Android apps.
Customer
- ?
- Technically less important than multi-args and easier to work around
Cruft
What?
Definition
- This ticket proposes adding API methods to QtQuickView and maybe QtQuickViewContent to:
- Access and modify properties of QML singletons.
- Connect to signals emitted by QML singletons.
- Possibly invoke functions of the singleton (if we generally add the support for non-singletons)
- This functionality would mirror existing capabilities for regular QML components (e.g., QtQuickViewContent interactions) and provide an easy way to integrate singleton-based logic into Android workflows.
Demarcation
- What this is not? soarmin __
Dependencies
- FF (end of May 2025) dependent 6.10 for the new API
Attachments
Gerrit Reviews
For Gerrit Dashboard: QTBUG-134076 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
556570,8 | WIP: Android: Add possibility to connect to Singleton signals from QtQuickView | dev | qt/qtdeclarative | Status: NEW | -2 | 0 |