aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/doc/tools/pyside-project.rst
blob: 0359e1b7d7ffb578d5e69f16d017a535797d9d02 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
.. _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 Widgets 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/