diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2024-02-19 14:32:17 +0100 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2024-03-01 12:57:53 +0100 |
commit | 78254403931559bf5cfa97e3284f9d42892cc230 (patch) | |
tree | 4878a8c48c5c4a1c41977055dab1f3650b4d7416 | |
parent | a3720c3099bd039b01e4f5f4a946b1a15b0dafa6 (diff) |
Add documentation on pyside6-project
Task-number: PYSIDE-1112
Change-Id: I9b6b01c9dd45440ce0b2832178b11072d33ba06d
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
(cherry picked from commit c2358000248ef49c80699375ecd6ff9091a6d316)
Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io>
-rw-r--r-- | sources/pyside6/doc/contents.rst | 1 | ||||
-rw-r--r-- | sources/pyside6/doc/gettingstarted/package_details.rst | 3 | ||||
-rw-r--r-- | sources/pyside6/doc/tools/index.rst | 7 | ||||
-rw-r--r-- | sources/pyside6/doc/tools/pyside-project.rst | 63 |
4 files changed, 73 insertions, 1 deletions
diff --git a/sources/pyside6/doc/contents.rst b/sources/pyside6/doc/contents.rst index 04203a53e..4b6c7ffa9 100644 --- a/sources/pyside6/doc/contents.rst +++ b/sources/pyside6/doc/contents.rst @@ -7,6 +7,7 @@ commercial/index.rst gettingstarted/index.rst api.rst + tools/index.rst tutorials/index.rst examples/index.rst videos.rst diff --git a/sources/pyside6/doc/gettingstarted/package_details.rst b/sources/pyside6/doc/gettingstarted/package_details.rst index 40276ae15..5f42a8872 100644 --- a/sources/pyside6/doc/gettingstarted/package_details.rst +++ b/sources/pyside6/doc/gettingstarted/package_details.rst @@ -94,11 +94,12 @@ Project development :gutter: 3 3 4 5 .. grid-item-card:: ``pyside6-project`` + :link: pyside6-project + :link-type: ref to build Qt Designer forms (``.ui`` files), resource files (``.qrc``) and QML type files (``.qmltype``) from a ``.pyproject`` file. - Widget Development ~~~~~~~~~~~~~~~~~~ diff --git a/sources/pyside6/doc/tools/index.rst b/sources/pyside6/doc/tools/index.rst new file mode 100644 index 000000000..68a5d4fc5 --- /dev/null +++ b/sources/pyside6/doc/tools/index.rst @@ -0,0 +1,7 @@ +Tools +===== + +.. toctree:: + :glob: + + pyside-project.rst diff --git a/sources/pyside6/doc/tools/pyside-project.rst b/sources/pyside6/doc/tools/pyside-project.rst new file mode 100644 index 000000000..2a7394065 --- /dev/null +++ b/sources/pyside6/doc/tools/pyside-project.rst @@ -0,0 +1,63 @@ +.. _pyside6-project: + +pyside6-project +=============== + +`pyside6-project` is a command line tool for creating, building and deploying +|project| applications. It operates on a project file which is also used by +`Qt Creator`_. + +Project file format +------------------- + +The project file format is a simple `JSON`_-based format with the suffix +``.pyproject`` listing all files of the project excluding generated files +(typically ``.py``, ``.qml``, ``.qrc``, ``.ts``, or ``.ui`` files): + +.. code-block:: json + + { + "files": ["main.py"] + } + + +Usage +----- + +The tool has several subcommands. New projects can be created using +the below commands, passing the project name (directory): + +*new-ui* + Creates a new QtWidgets project with a Qt Designer-based main window. + +*new-widget* + Creates a new QtWidgets project with a main window. + +*new-quick* + Creates a new QtQuick project. + +The other commands take the project file as an argument. +It is also possible to specify a directory containing the project file. + +*build* + Builds the project, generating the required build artifacts + (see :ref:`using_ui_files`, :ref:`using_qrc_files`). + +*run* + Builds the project and runs the main. + +*deploy* + Deploys the application (see see :ref:`pyside6-deploy`). + +*lupdate* + Updates translation (.ts) files (see :ref:`translations`). + +*clean* + Cleans the build artifacts. + +*qmllint* + Runs the ``qmllint`` tool, checking the QML files. + + +.. _`Qt Creator`: https://www.qt.io/product/development-tools +.. _`JSON`: https://www.json.org/ |