aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeena Miettinen <riitta-leena.miettinen@qt.io>2019-04-03 13:29:19 +0200
committerLeena Miettinen <riitta-leena.miettinen@qt.io>2019-04-05 07:49:57 +0000
commit903da92051591094041d6434112f0c8c5fcd8e20 (patch)
tree8f337c2b01948d5d1a49532b56266b76d55d9580
parentb8e5a609e10f5ddf55d6d2d71238b1e46f5302c0 (diff)
Doc: Add information about running Qt for Python applications
Change-Id: Ibd9ed61bd1f771c8081f2c2d2fcc492f0a87da11 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
-rw-r--r--doc/images/qtcreator-python-run-settings-custom-executable.pngbin0 -> 4735 bytes
-rw-r--r--doc/images/qtcreator-python-run-settings.pngbin0 -> 3995 bytes
-rw-r--r--doc/src/projects/creator-only/creator-projects-opening.qdoc10
-rw-r--r--doc/src/projects/creator-only/creator-projects-settings-run.qdoc4
-rw-r--r--doc/src/projects/creator-projects-running.qdoc3
-rw-r--r--doc/src/python/creator-python-run.qdocinc73
6 files changed, 85 insertions, 5 deletions
diff --git a/doc/images/qtcreator-python-run-settings-custom-executable.png b/doc/images/qtcreator-python-run-settings-custom-executable.png
new file mode 100644
index 0000000000..3db0379f57
--- /dev/null
+++ b/doc/images/qtcreator-python-run-settings-custom-executable.png
Binary files differ
diff --git a/doc/images/qtcreator-python-run-settings.png b/doc/images/qtcreator-python-run-settings.png
new file mode 100644
index 0000000000..f5abe19861
--- /dev/null
+++ b/doc/images/qtcreator-python-run-settings.png
Binary files differ
diff --git a/doc/src/projects/creator-only/creator-projects-opening.qdoc b/doc/src/projects/creator-only/creator-projects-opening.qdoc
index 7fe17582ef..6298c896b5 100644
--- a/doc/src/projects/creator-only/creator-projects-opening.qdoc
+++ b/doc/src/projects/creator-only/creator-projects-opening.qdoc
@@ -1,7 +1,7 @@
/****************************************************************************
**
-** Copyright (C) 2018 The Qt Company Ltd.
+** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -58,6 +58,10 @@
select the \uicontrol Options link, or select \uicontrol Tools >
\uicontrol Options > \uicontrol Kits.
+ Qt for Python projects rely on the \l{Using Language Servers}
+ {experimental language server client} for code completion,
+ highlighting, and other useful features.
+
If \QC cannot find an existing build for a particular \l{glossary-buildandrun-kit}{kit},
it starts out
from a clean slate, and creates new debug and release build configurations
@@ -79,8 +83,8 @@
\li Select \uicontrol File > \uicontrol {Open File or Project}
(\key Ctrl+O or \key Cmd+O on \macos) and select the project file
for the project to open: \e {.pro} (qmake), \e {CMakeLists.txt}
- (CMake), \e {.qbs} (Qbs), or \e {Makefile.am} (Autotools,
- experimental).
+ (CMake), \e {.qbs} (Qbs), \e {pyproject} (Python), or
+ \e {Makefile.am} (Autotools, experimental).
\li In the \uicontrol {Configure Project} tab, select kits for building and running your
project, and click \uicontrol {Configure Project}.
diff --git a/doc/src/projects/creator-only/creator-projects-settings-run.qdoc b/doc/src/projects/creator-only/creator-projects-settings-run.qdoc
index 1010186a3f..a67b2052fd 100644
--- a/doc/src/projects/creator-only/creator-projects-settings-run.qdoc
+++ b/doc/src/projects/creator-only/creator-projects-settings-run.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2018 The Qt Company Ltd.
+** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -117,4 +117,6 @@
\image qmldesigner-run-custom-exe.png "Run settings for custom executables"
\include qtquick/creator-projects-settings-run-qtquick.qdocinc run settings qt quick ui
+ \include python/creator-python-run.qdocinc run settings python
+
*/
diff --git a/doc/src/projects/creator-projects-running.qdoc b/doc/src/projects/creator-projects-running.qdoc
index caca6bb636..85cb0b287c 100644
--- a/doc/src/projects/creator-projects-running.qdoc
+++ b/doc/src/projects/creator-projects-running.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2018 The Qt Company Ltd.
+** Copyright (C) 2019 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the Qt Creator documentation.
@@ -85,5 +85,6 @@
\if defined(qtcreator)
\include qnx/creator-projects-running-qnx.qdocinc running on qnx
+ \include python/creator-python-run.qdocinc running python
\endif
*/
diff --git a/doc/src/python/creator-python-run.qdocinc b/doc/src/python/creator-python-run.qdocinc
new file mode 100644
index 0000000000..cc9b19698c
--- /dev/null
+++ b/doc/src/python/creator-python-run.qdocinc
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2019 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the Qt Creator documentation.
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+**
+****************************************************************************/
+
+/*!
+//! [running python]
+ \section1 Running Python Projects
+
+ You can execute Qt for Python applications directly from \QC. If you
+ used the \l{Creating Qt for Python Applications}{new project wizard}
+ to create the application project, the \c main.py file is automatically
+ executed when you select the \uicontrol Run button.
+
+ You can specify another file to execute in the
+ \l{Specifying Run Settings for Python Projects}{run settings}
+ of the project.
+
+//! [running python]
+
+
+//! [run settings python]
+
+ \section1 Specifying Run Settings for Python Projects
+
+ You can specify settings for running Qt for Python applications:
+
+ \image qtcreator-python-run-settings.png
+
+ \list
+ \li In the \uicontrol Interpreter field, specify the path to the
+ Python executable.
+ \li In the \uicontrol Script field, you can see the path to the
+ main file of the project that will be run.
+ \li In the \uicontrol {Command line arguments} field, specify
+ command line arguments to be passed to the executable.
+ \endlist
+
+ If you want to run some other Python file than \c main.py, create a custom
+ executable run configuration:
+
+ \image qtcreator-python-run-settings-custom-executable.png
+
+ \list 1
+ \li Select \uicontrol Add > \uicontrol {Custom Executable}.
+ \li In the \uicontrol Executable field, specify the path to the
+ Python executable.
+ \li In the \uicontrol {Command line arguments} field, select
+ the Python file to run.
+ \endlist
+
+//! [run settings python]
+*/