You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
or ``--permission android.permission.WRITE_EXTERNAL_STORAGE``.
80
80
81
-
The first syntax is used to set additional properties to the permission
81
+
The first syntax is used to set additional properties to the permission
82
82
(``android:maxSdkVersion`` and ``android:usesPermissionFlags`` are the only ones supported for now).
83
83
84
84
The second one can be used when there's no need to add any additional properties.
@@ -148,7 +148,7 @@ ready.
148
148
(Which is the default on Android 12+), this setting is not guaranteed to work, and
149
149
you should consider to implement a custom orientation change handler in your app.
150
150
- ``--manifest-orientation``: The orientation that will be set in the ``android:screenOrientation``
151
-
attribute of the activity in the ``AndroidManifest.xml`` file. If not set, the value
151
+
attribute of the activity in the ``AndroidManifest.xml`` file. If not set, the value
152
152
will be synthesized from the ``--orientation`` option.
153
153
The full list of valid options is given under ``android:screenOrientation``
154
154
in the `Android documentation <https://developer.android.com/guide/topics/manifest/activity-element.html>`__.
@@ -187,7 +187,7 @@ You can use this with ``--bootstrap=service_library`` option.
187
187
188
188
189
189
This bootstrap can be used together with ``aar`` output target to generate
190
-
a library, containing Python services that can be used with other build
190
+
a library, containing Python services that can be used with other build
191
191
systems and frameworks.
192
192
193
193
- ``--private``: The directory containing your project files.
@@ -204,6 +204,49 @@ systems and frameworks.
204
204
include multiple jar files, pass this argument multiple times.
205
205
- ``add-source``: Add a source directory to the app's Java code.
206
206
207
+
Qt
208
+
~~
209
+
210
+
This bootstrap can be used with ``--bootstrap=qt`` or by including the ``PySide6`` or
211
+
``shiboken6`` recipe, e.g. ``--requirements=PySide6,shiboken6``. Currently, the only way
212
+
to use this bootstrap is through `pyside6-android-deploy <https://www.qt.io/blog/taking-qt-for-python-to-android>`__
213
+
tool shipped with ``PySide6``, as the recipes for ``PySide6`` and ``shiboken6`` are created
214
+
dynamically. The tool builds ``PySide6`` and ``shiboken6`` wheels for a specific Android platform
215
+
and the recipes simply unpack the built wheels. You can see the recipes `here <https://code.qt.io/cgit/pyside/pyside-setup.git/tree/sources/pyside-tools/deploy_lib/android/recipes>`__.
216
+
217
+
.. note::
218
+
The ``pyside6-android-deploy`` tool and hence the Qt bootstrap does not support multi-architecture
219
+
builds currently.
220
+
221
+
What are Qt and PySide?
222
+
%%%%%%%%%%%%%%%%%%%%%%%%
223
+
224
+
`Qt <https://www.qt.io/>`__ is a popularly used cross-platform C++ framewrok for developing
225
+
GUI applications. `PySide6 <https://doc.qt.io/qtforpython-6/quickstart.html>`__ refers to the
226
+
Python bindings for Qt6, and enables the Python developers access to the Qt6 API.
227
+
`Shiboken6 <https://doc.qt.io/qtforpython-6/shiboken6/index.html>`__ is the binding generator
228
+
tool used for generating the Python bindings from C++ code.
229
+
230
+
.. note:: The `shiboken6` recipe is for the `Shiboken Python module <https://doc.qt.io/qtforpython-6/shiboken6/shibokenmodule.html>`__
231
+
which includes a couple of utility functions for inspecting and debugging PySide6 code.
232
+
233
+
Build Options
234
+
%%%%%%%%%%%%%
235
+
236
+
``pyside6-android-deploy`` works by generating a ``buildozer.spec`` file and thereby using
237
+
`buildozer <https://buildozer.readthedocs.io/en/latest/>`__ to control the build options used by
238
+
``python-for-android`` with the Qt bootstrap. Apart from the general build options that works
239
+
across all the other bootstraps, the Qt bootstrap introduces the following 3 new build options.
240
+
241
+
- ``--qt-libs``: list of Qt libraries(modules) to be loaded.
242
+
- ``--load-local-libs``: list of Qt plugin libraries to be loaded.
243
+
- ``--init-classes``: list of Java class names to the loaded from the Qt jar files supplied through
244
+
the ``--add-jar`` option.
245
+
246
+
These build options are automatically populated by the ``pyside6-android-deploy`` tool, but can be
247
+
modified by updating the ``buildozer.spec`` file. Apart from the above 3 build options, the tool
248
+
also automatically identifies the values to be fed into the cli options ``--permission``, ``--add-jar``
249
+
depending on the PySide6 modules used by the applicaiton.
Copy file name to clipboardExpand all lines: doc/source/quickstart.rst
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -26,8 +26,8 @@ Concepts
26
26
27
27
- **bootstrap:** A bootstrap is the app backend that will start your
28
28
application. The default for graphical applications is SDL2.
29
-
You can also use e.g. the webview for web apps, or service_only/service_library for
30
-
background services. Different bootstraps have different additional
29
+
You can also use e.g. the webview for web apps, or service_only/service_library for
30
+
background services, or qt for PySide6 apps. Different bootstraps have different additional
31
31
build options.
32
32
33
33
*Advanced:*
@@ -114,7 +114,7 @@ You need to download and unpack the Android SDK and NDK to a directory (let's sa
114
114
For the Android SDK, you can download 'just the command line
115
115
tools'. When you have extracted these you'll see only a directory
116
116
named ``tools``, and you will need to run extra commands to install
117
-
the SDK packages needed.
117
+
the SDK packages needed.
118
118
119
119
For Android NDK, note that modern releases will only work on a 64-bit
120
120
operating system. **The minimal, and recommended, NDK version to use is r25b:**
@@ -214,7 +214,7 @@ website. The default for Flask is 5000.
214
214
Build a Service library archive
215
215
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
216
216
217
-
To build an android archive (.aar), containing an android service , you need a name, version, package identifier, explicitly use the
217
+
To build an android archive (.aar), containing an android service , you need a name, version, package identifier, explicitly use the
218
218
service_library bootstrap, and declare service entry point (See :ref:`services <arbitrary_scripts_services>` for more options), as well as the requirements and arch(s)::
0 commit comments