Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-134076

Expose QML singletons to Android

XMLWordPrintable

    • Icon: User Story User Story
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • None
    • Quick: Other

      Why?

      Cause i.e why is it needed?

      • Java/Kotlin Android developers can't directly interact with QML singletons (objects defined with pragma Singleton in QML) through the Java/Kotlin interface.
      • QML singletons are essential for managing global states or utilities in QML apps. This restricts accessing or manipulating global states in hybrid Android apps

      Customer i.e. who needs it?

      • QML Themes, like Light vs Dark theme in QML
      • Perhaps QQ4A app user which shows Qt Location to show maps
      • Moving logic with state machine from C++ to QML

      Cruft i.e. why it is not needed (counter arguments)?

      • There is a workaround (property changes, and later function calls) for it
      • Android has integration to Maps
      • C++ state machine should go to Android Java/Kotlin side 

      What?

      Definition - i.e what is it?

      • 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 -  i.e. it is not?

      • Not a C++ singleton generation only QML singleton
      •  

      Dependencies -  i.e. it needs?

      How?

      Effort - i.e  how easy or hard does it feel?

      Estimate - i.e. how big is the amount of work (in calendar time)?

      Essential - i.e the add on value it brings? High

      When?

      Flex i.e. time-bound (like platform or feature freeze) or not is it?

      • New API, so bound to Qt 6.11 FF in early December

      Force i.e. labor (do we have enough people working on it) capacity?

      Fit i.e. does it fit in (like Qt release)?

      • Qt 6.11?

       

        For Gerrit Dashboard: QTBUG-134076
        # Subject Branch Project Status CR V

            qtandroidteam Qt Android Team
            soarmin Soheil Armin
            Bruno Vunderl Bruno Vunderl
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: