2 Commits

Author SHA1 Message Date
Tinja Paavoseppä
dc5894b865 Android: Resize QWindow when its QtView is resized
If the Android View is resized, the QWindow instantiated by it
should be resized accordingly.

Task-number: QTBUG-122626
Change-Id: I7bfbca149f927718d1e28cdabfa8759afbd06039
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 7942f7eedf4a8d7fac82737ea490f3c443e82149)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-03-13 17:15:30 +00:00
Tinja Paavoseppä
7aaa351742 Android: Add classes to embed QML into native Android
Add classes that make it possible to add QML as a View into
a native Android app:

QtView: Base class for QtQuickView, handles non-Quick dependent
operations. In essence a Java ViewGroup class which loads a
QWindow and embeds it into itself.

QtEmbeddedLoader: Extends QtLoader for embedded case, creates the
embedded version of QtActivityDelegate and provides an embedded-specific
path to loading Qt libraries (Mostly just allows users to set the name
of the main lib)

QtAndroidWindowEmbedding namespace: Deals with calls from
QtEmbeddedDelegate to create/destroy QWindow and from QtView to
show the window.

Take the QtEmbeddedDelegate introduced in an earlier commit
into use, and add functionality for loading QWindows for
QtViews and managing QtViews into it.

Add a factory for creating instances of QtEmbeddedDelegate.
The factory holds a map of QtEmbeddedDelegate objects and
creates them, with the Activity as the key. This is to make
it so that the same delegate can be used by multiple views
which share the same Context.

Known issues left:
* keyboard focus not working, as with other child windows

Task-number: QTBUG-118872
Change-Id: I94a5f9b4f904c05cc6368cf20f273fcf10d31f17
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
(cherry picked from commit 702c420f51d9d56ca056315387f224ec2dba3ff3)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2024-01-30 22:07:35 +00:00