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

QtQuickView is not able to be hosted in Fragments

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.8, 6.9
    • QPA: Android
    • Android

    Description

      QtQuickViews are not correctly loaded if the host view is loaded within a Fragment. It loads the Qt libraries and calls main(), but stops short of actually creating the QQuickView and loading QML into it.

      This is due to QtEmbeddedDelegate using the UI thread to queue the QQuickView creation process. In the fragment host usecase, QtNative.runAction() will not actually run any queued actions due to the application state being stuck at Suspended.
      Normally, QtEmbeddedDelegate receives activity status updates via the Application.ActivityLifecycleCallbacks interface, and sets the application state accordingly. In the fragment case, this callback is never called, and so QtNative.runAction will never pass any Runnables to the UI thread handler at all.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              qtandroidteam Qt Android Team
              pevirkku Petri Virkkunen
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes