From 903da92051591094041d6434112f0c8c5fcd8e20 Mon Sep 17 00:00:00 2001 From: Leena Miettinen Date: Wed, 3 Apr 2019 13:29:19 +0200 Subject: [PATCH] Doc: Add information about running Qt for Python applications Change-Id: Ibd9ed61bd1f771c8081f2c2d2fcc492f0a87da11 Reviewed-by: Cristian Maureira-Fredes --- ...-python-run-settings-custom-executable.png | Bin 0 -> 4735 bytes doc/images/qtcreator-python-run-settings.png | Bin 0 -> 3995 bytes .../creator-projects-opening.qdoc | 10 ++- .../creator-projects-settings-run.qdoc | 4 +- .../projects/creator-projects-running.qdoc | 3 +- doc/src/python/creator-python-run.qdocinc | 73 ++++++++++++++++++ 6 files changed, 85 insertions(+), 5 deletions(-) create mode 100644 doc/images/qtcreator-python-run-settings-custom-executable.png create mode 100644 doc/images/qtcreator-python-run-settings.png create mode 100644 doc/src/python/creator-python-run.qdocinc 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 0000000000000000000000000000000000000000..3db0379f573331deed1e05d7ddab5b1051440856 GIT binary patch literal 4735 zcmeAS@N?(olHy`uVBq!ia0y~yU@~H0V7SD=%)r2qe)84<1_mbi0G|+71`sf2V6b9f zh+<$!V=xM2Fs^5?vSP5Bz!09s5Ve3IZ5ukpdGy=w(B%gTx&%?bq4tgI$jrKMS=ZL_Mbwwf@Ra#KK=CDnKNguUcGw#`t=((ZrptH^Y#R*+Y{1mZ%YHadfV;)w{QRd|8POn z!-Mq?A1-+K@ZiIT4<9{x^yuTSC!c;j`~3Um%a^ZSy?XoY&xa2mKK=ar?c2A%|Nj5` z_wWCJXq5slmi?!oh)!$w**AV*?Kh zqa>7jVVc{rjmMRG^%nUo_;Dg-&Yr1Sivt$0oVao2%$1k>Ez?t_s@>`nA~UB5irhWb zW36ZOs9vSrscF$MBgx~L^r{4(|IiH%8y62UhZp(_^=H5J)8MTJ* zM8KU>?|#lxD4yzB>eQC~FeQINrd*83)_XJbeC^lmlH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&i;Fh=V-@W*nHe>dc z8#BA4?Cc)*+}Jy@`^1?xp1_$qCpvRqo-8RTa(&*$HIq+qnTK8tQ%r5N-lHp;F>7|k z8ol{X{6jczD5lStw1QJ9SZ?Zv-ZBdgqZFFe*|91?eOOZ>Ifnt`fI<)w8;s+Gw>l3#26zCS0U|DTcgx9{wk7bbHu z&%OS1;$zDDUlFrs2nvTTnpx>)#Vy$V$(u1LW%J3N zO>ftBgubulOI(}3{O$jJlRnGTJSv>z-s$Tnb?%Gt;aAVijP`u*x_&O>@|5gFUM9wy zSFJw&_OoZATXZYe?Q862XMAgxuZ~OGv3%+}i;o_&CviwtFU{&Z?Eke?)pxdWW!QeNTZi4`PbVBpUvwzFYWEXi&bxsHrv+{lz6iOb z`_05jR$ozV6=UMD(!-)p%I$77%C_^V=H{Q|XLy3n$j>&Fwl;+MX{3CUDM&a4Jc~)|} z_fC{74$_!eebSwGhU6K$55DQQr0k9R%w2qQifxXY2{q3YO}CT2?tJL+&!d-LRCmzg}Z5ivcSKo32KpNPP{*zzgCdZxHH+!e^TO^ z)?}SiK91*jtj@i$%wu}HjmelZ*=kxwQCTzh;^b8B>Gtzk zp9~-GTD!o-Fgd)fNc3>*)AY7e>a}&T)SY20dwQbI8X}&;vsmMCNQH>=;RqA zP+Q?sTAG}#%T|ZGUq4(-OMByf`n%$a?rE|qHD??GB%rN`Te-jNSM}`U5f My85}Sb4q9e0FFAd#sB~S literal 0 HcmV?d00001 diff --git a/doc/src/projects/creator-only/creator-projects-opening.qdoc b/doc/src/projects/creator-only/creator-projects-opening.qdoc index 7fe17582ef9..6298c896b52 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 1010186a3f1..a67b2052fda 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 caca6bb6369..85cb0b287c1 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 00000000000..cc9b19698ca --- /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] +*/