-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.9.1
-
Android Studio x86_64 Emulator (API 35),
Windows 11 23H2,
CMake = 3.30.5,
Gradle = 8.14,
Qt Tools for Android Studio = 4.1,
QtGP = 1.3,
Kotlin = 2.0.21,
Java = jdk-17,
NDK = 27.2.12479018
What:
When an app has QtQuickViews placed in Jetpack Composes navigation graphs non-start screens, the Views do not render. When checking the log, qtQuickView status also isn’t being set to READY as opposed to the startDestination screen where its status is. This leads to the Views not being rendered.
This happens when:
- the Views are initialized in onCreate() and then applied at AndroidView() factory and,
- when they are initialized on a composable function (see picture) and then applied at AndroidView() factory.
When qtQuickView from the code above is displayed in the startDestination, the qtQuickView gets displayed as expected. However, when this code is in a composable view that the navigation structure does not start from, the qtQuickView does not get displayed.
If an XML layout is placed in the AndroidView() were a qtQuickView is failing to render, the XML layout renders without problems
The example project and video showcase 3 instances to highlight problems and difference between expected and actual behaviour:
- onCreate initialization
- Compose function initialization
- Display XML frame
Steps to reproduce:
(Fully restart app every time you reach step 4 and want to choose other options)
- Open app
- Click "Navigation Problems"
- Do not interact with visible QtQuickView (
QTBUG-138922) - Choose from one of the following:
- Click "Remember initialization example"
- Click "onCreate initialization example"
- Click "XML layout example"
- Observe behaviour:
- EXPECTED / ACTUAL = Visible QtQuickView / No rendered QtQuickView
- EXPECTED / ACTUAL = Visible QtQuickView / No rendered QtQuickView
- EXPECTED / ACTUAL = Visible XML content / Visible XML content
Example video:
Example project:
QTBUG-139081.7z
(Note: replace QtBuild file directories in build.gradle with your local installations)
- resulted from
-
QTBUG-138112 How to use QtQuickView in Jetpack Compose?
-
- Reported
-