Merge remote-tracking branch 'origin/14.0'
Conflicts: cmake/QtCreatorIDEBranding.cmake qbs/modules/qtc/qtc.qbs src/plugins/qmljseditor/qmljseditordocument.cpp Change-Id: Ibef70b4c0eba5ccd5da7b05ca2bd3a9e8ee1cc0c
@@ -30,16 +30,16 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="indexboxcont indexboxbar">
|
<div class="indexboxcont indexboxbar">
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="creator-tutorial-adding-internal-libraries-to-projects.html">Adding an Internal Library to a qmake Project</a></li>
|
<li><a href="creator-build-example-application.html">Build and run</a></li>
|
||||||
<li><a href="creator-build-example-application.html">Building and Running an Example</a></li>
|
<li><a href="creator-debugging-example.html">C++ debugging</a></li>
|
||||||
<li><a href="qtcreator-accelbubble-example.html">Creating a Mobile Application</a></li>
|
<li><a href="qtcreator-accelbubble-example.html">Mobile application</a></li>
|
||||||
<li><a href="qtcreator-transitions-example.html">Creating a Qt Quick Application</a></li>
|
<li><a href="creator-tutorial-python-application-qt-quick.html">Qt Quick and Python</a></li>
|
||||||
<li><a href="creator-writing-program.html">Creating a Qt Widget Based Application</a></li>
|
<li><a href="qtcreator-transitions-example.html">Qt Quick application</a></li>
|
||||||
<li><a href="creator-tutorial-python-application-qt-quick.html">Creating a Qt for Python Application with Qt Quick</a></li>
|
<li><a href="creator-qml-debugging-example.html">Qt Quick debugging</a></li>
|
||||||
<li><a href="creator-tutorial-python-application-qt-widgets.html">Creating a Qt for Python Application with Qt Widgets</a></li>
|
<li><a href="creator-tutorial-python-application-qt-widgets.html">Qt Widgets and Python</a></li>
|
||||||
<li><a href="creator-debugging-example.html">Debugging a C++ Application</a></li>
|
<li><a href="creator-writing-program.html">Qt Widgets application</a></li>
|
||||||
<li><a href="creator-qml-debugging-example.html">Debugging a Qt Quick Application</a></li>
|
<li><a href="creator-tutorial-adding-internal-libraries-to-projects.html">Use internal libraries with qmake</a></li>
|
||||||
<li><a href="creator-tutorials.html">See All</a></li>
|
<li><a href="creator-tutorials.html">Tutorials</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
<li><a href="creator-how-tos.html#test">Test</a></li>
|
<li><a href="creator-how-tos.html#test">Test</a></li>
|
||||||
<li><a href="creator-how-tos.html#use-qt-creator">Use Qt Creator</a></li>
|
<li><a href="creator-how-tos.html#use-qt-creator">Use Qt Creator</a></li>
|
||||||
<li><a href="creator-how-tos.html#use-the-ui">Use the UI</a></li>
|
<li><a href="creator-how-tos.html#use-the-ui">Use the UI</a></li>
|
||||||
<li><a href="creator-how-tos.html">See All</a></li>
|
<li><a href="creator-how-tos.html">How To</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="sectionlist normallist">
|
<div class="sectionlist normallist">
|
||||||
@@ -76,6 +76,7 @@
|
|||||||
<li><a href="creator-glossary.html">Glossary</a></li>
|
<li><a href="creator-glossary.html">Glossary</a></li>
|
||||||
<li><a href="creator-keyboard-shortcuts.html">Keyboard Shortcuts</a></li>
|
<li><a href="creator-keyboard-shortcuts.html">Keyboard Shortcuts</a></li>
|
||||||
<li><a href="creator-known-issues.html">Known Issues</a></li>
|
<li><a href="creator-known-issues.html">Known Issues</a></li>
|
||||||
|
<li><a href="creator-sdk-tool.html">SDK Tool</a></li>
|
||||||
<li><a href="technical-support.html">Technical Support</a></li>
|
<li><a href="technical-support.html">Technical Support</a></li>
|
||||||
<li><a href="creator-version-control.html">Version Control Systems</a></li>
|
<li><a href="creator-version-control.html">Version Control Systems</a></li>
|
||||||
<li><a href="creator-reference.html#analyzers">Analyzers</a></li>
|
<li><a href="creator-reference.html#analyzers">Analyzers</a></li>
|
||||||
@@ -87,6 +88,6 @@
|
|||||||
<li><a href="creator-reference.html#preferences">Preferences</a></li>
|
<li><a href="creator-reference.html#preferences">Preferences</a></li>
|
||||||
<li><a href="creator-reference.html#ui-design">UI Design</a></li>
|
<li><a href="creator-reference.html#ui-design">UI Design</a></li>
|
||||||
<li><a href="creator-reference.html#views">Views</a></li>
|
<li><a href="creator-reference.html#views">Views</a></li>
|
||||||
<li><a href="creator-reference.html">See All</a></li>
|
<li><a href="creator-reference.html">Reference</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 8.2 KiB |
|
Before Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 11 KiB |
BIN
doc/qtcreator/images/qtcreator-new-file-qrc.webp
Normal file
|
After Width: | Height: | Size: 9.5 KiB |
BIN
doc/qtcreator/images/qtcreator-new-file-qrc1.webp
Normal file
|
After Width: | Height: | Size: 5.0 KiB |
BIN
doc/qtcreator/images/qtcreator-new-file-qrc2.webp
Normal file
|
After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 8.2 KiB |
BIN
doc/qtcreator/images/qtcreator-new-project-build-system.webp
Normal file
|
After Width: | Height: | Size: 5.2 KiB |
BIN
doc/qtcreator/images/qtcreator-new-project-class-info.webp
Normal file
|
After Width: | Height: | Size: 7.0 KiB |
BIN
doc/qtcreator/images/qtcreator-new-project-kit-selection.webp
Normal file
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 6.7 KiB |
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 2.2 KiB |
|
After Width: | Height: | Size: 7.3 KiB |
BIN
doc/qtcreator/images/qtcreator-new-project-python-window-ui.webp
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 17 KiB |
BIN
doc/qtcreator/images/qtcreator-new-project-qt-widgets.webp
Normal file
|
After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 13 KiB |
BIN
doc/qtcreator/images/qtcreator-new-project-summary.webp
Normal file
|
After Width: | Height: | Size: 7.4 KiB |
BIN
doc/qtcreator/images/qtcreator-new-project-translation-file.webp
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 4.9 KiB |
|
Before Width: | Height: | Size: 6.0 KiB After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 6.5 KiB |
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.0 KiB |
BIN
doc/qtcreator/images/qtcreator-project-settings-copilot.webp
Normal file
|
After Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 9.4 KiB |
|
After Width: | Height: | Size: 6.8 KiB |
@@ -179,11 +179,10 @@
|
|||||||
\li Go to \uicontrol Projects > \uicontrol {Project Settings} >
|
\li Go to \uicontrol Projects > \uicontrol {Project Settings} >
|
||||||
\uicontrol Axivion.
|
\uicontrol Axivion.
|
||||||
\image qtcreator-preferences-axivion-project.webp {Axivion settings in Project Settings}
|
\image qtcreator-preferences-axivion-project.webp {Axivion settings in Project Settings}
|
||||||
\li From \uicontrol {Dashboard} select one of the configured Axivion
|
\li Select the Axivion dashboard server to fetch projects from.
|
||||||
dashboard configurations.
|
\li Select \uicontrol {Fetch Projects} to list projects from the server.
|
||||||
\li Select \uicontrol {Fetch Projects} to list projects from Axivion.
|
\li In \uicontrol {Dashboard projects} select a project.
|
||||||
\li Select a project, and then select \uicontrol {Link Project} to link
|
\li Select \uicontrol {Link Project} to link to the project.
|
||||||
to it.
|
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
To unlink a project, select \uicontrol {Unlink Project}.
|
To unlink a project, select \uicontrol {Unlink Project}.
|
||||||
|
|||||||
@@ -227,7 +227,7 @@
|
|||||||
|
|
||||||
If you use CMake as the build system, you must specify the Android package
|
If you use CMake as the build system, you must specify the Android package
|
||||||
source directory, \c QT_ANDROID_PACKAGE_SOURCE_DIR, in the CMakeList.txt
|
source directory, \c QT_ANDROID_PACKAGE_SOURCE_DIR, in the CMakeList.txt
|
||||||
file, as instructed in the \l{Locking Device Orientation}
|
file, as instructed in the \l{Lock device orientation}
|
||||||
{mobile device tutorial}.
|
{mobile device tutorial}.
|
||||||
|
|
||||||
To use \QC to create an Android manifest file and to open it in the Android
|
To use \QC to create an Android manifest file and to open it in the Android
|
||||||
|
|||||||
@@ -126,6 +126,9 @@
|
|||||||
To speed up the process on Windows, specify the \c CMAKE_C_COMPILER and
|
To speed up the process on Windows, specify the \c CMAKE_C_COMPILER and
|
||||||
\c CMAKE_CXX_COMPILER in the \c cacheVariables section.
|
\c CMAKE_CXX_COMPILER in the \c cacheVariables section.
|
||||||
|
|
||||||
|
For possible values of some of the \c debugger parameters, see
|
||||||
|
\l{Adding Debuggers}.
|
||||||
|
|
||||||
\section1 Ninja Generator Example
|
\section1 Ninja Generator Example
|
||||||
|
|
||||||
The following configure and build presets set Ninja Multi-Config as the
|
The following configure and build presets set Ninja Multi-Config as the
|
||||||
@@ -297,5 +300,5 @@
|
|||||||
}
|
}
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
\sa {CMake Build Configuration}, {CMake}
|
\sa {CMake Build Configuration}, {CMake}, {SDK Tool}
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Copyright (C) 2018 The Qt Company Ltd.
|
// Copyright (C) 2024 The Qt Company Ltd.
|
||||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
|
||||||
|
|
||||||
// **********************************************************************
|
// **********************************************************************
|
||||||
@@ -14,11 +14,12 @@
|
|||||||
|
|
||||||
\ingroup creator-tutorials
|
\ingroup creator-tutorials
|
||||||
|
|
||||||
\title Debugging a C++ Application
|
\keyword {Debugging a C++ Application}
|
||||||
|
\title Tutorial: C++ debugging
|
||||||
|
|
||||||
\brief How to debug a C++ application.
|
\brief How to debug a C++ application.
|
||||||
|
|
||||||
This tutorial uses the \l{Creating a Qt Widget Based Application}{TextFinder}
|
This tutorial uses the \l{Tutorial: Qt Widgets application}{TextFinder}
|
||||||
example to illustrate how to debug Qt C++ applications in the
|
example to illustrate how to debug Qt C++ applications in the
|
||||||
\uicontrol Debug mode.
|
\uicontrol Debug mode.
|
||||||
|
|
||||||
@@ -95,5 +96,5 @@
|
|||||||
(\uicontrol {Step Into}), and \inlineimage icons/debugger_stepout_small.png
|
(\uicontrol {Step Into}), and \inlineimage icons/debugger_stepout_small.png
|
||||||
(\uicontrol {Step Out}).
|
(\uicontrol {Step Out}).
|
||||||
|
|
||||||
\sa {Creating a Qt Widget Based Application}, {Debugging}, {Debuggers}, {Debugger}
|
\sa {Tutorial: Qt Widgets application}, {Debugging}, {Debuggers}, {Debugger}
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -140,7 +140,7 @@
|
|||||||
|
|
||||||
\l{https://docs.python.org/3/library/pdb.html}{PDB} is a source code debugger
|
\l{https://docs.python.org/3/library/pdb.html}{PDB} is a source code debugger
|
||||||
for Python applications. You can use it to debug projects that have a
|
for Python applications. You can use it to debug projects that have a
|
||||||
\l {Creating a Qt for Python Application with Qt Widgets}{.pyproject}
|
\l {Tutorial: Qt Widgets and Python}{.pyproject}
|
||||||
configuration file.
|
configuration file.
|
||||||
|
|
||||||
Install Python and set the interpreter to use in \uicontrol Projects
|
Install Python and set the interpreter to use in \uicontrol Projects
|
||||||
|
|||||||
@@ -207,9 +207,9 @@
|
|||||||
expressions.
|
expressions.
|
||||||
|
|
||||||
For more information, see \l{Debugging Qt Quick Projects} and
|
For more information, see \l{Debugging Qt Quick Projects} and
|
||||||
\l{Debugging a Qt Quick Application}.
|
\l{Tutorial: Qt Quick debugging}.
|
||||||
|
|
||||||
\sa {Debugging a C++ Application}, {Debug}{How To: Debug}, {Debuggers},
|
\sa {Tutorial: C++ debugging}, {Debug}{How To: Debug}, {Debuggers},
|
||||||
{Debugger}, {Kits}
|
{Debugger}, {Kits}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -263,7 +263,7 @@
|
|||||||
|
|
||||||
\section1 Debug Python projects
|
\section1 Debug Python projects
|
||||||
|
|
||||||
For \l {Creating a Qt for Python Application with Qt Widgets}{Python} projects,
|
For \l {Tutorial: Qt Widgets and Python}{Python} projects,
|
||||||
start debugging the \c main.py file. If you encounter problems, check the
|
start debugging the \c main.py file. If you encounter problems, check the
|
||||||
active build target in the \l{Build for many platforms}{kit selector}.
|
active build target in the \l{Build for many platforms}{kit selector}.
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,8 @@
|
|||||||
|
|
||||||
\ingroup creator-tutorials
|
\ingroup creator-tutorials
|
||||||
|
|
||||||
\title Debugging a Qt Quick Application
|
\keyword {Debugging a Qt Quick Application}
|
||||||
|
\title Tutorial: Qt Quick debugging
|
||||||
|
|
||||||
\brief How to debug a Qt Quick application.
|
\brief How to debug a Qt Quick application.
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
JavaScript variables, as well as change their values temporarily at runtime.
|
JavaScript variables, as well as change their values temporarily at runtime.
|
||||||
|
|
||||||
For an example of how to debug Qt Quick Projects, see
|
For an example of how to debug Qt Quick Projects, see
|
||||||
\l{Debugging a Qt Quick Application}.
|
\l{Tutorial: Qt Quick debugging}.
|
||||||
|
|
||||||
\if defined(qtdesignstudio)
|
\if defined(qtdesignstudio)
|
||||||
\note In this section, you are using advanced menu items. These are not
|
\note In this section, you are using advanced menu items. These are not
|
||||||
|
|||||||
@@ -98,14 +98,24 @@
|
|||||||
You can turn the Copilot suggestions on and off either globally for all
|
You can turn the Copilot suggestions on and off either globally for all
|
||||||
projects or at project level for a particular project.
|
projects or at project level for a particular project.
|
||||||
|
|
||||||
|
\section2 Toggle Copilot suggestions
|
||||||
|
|
||||||
To turn Copilot suggestions on or off globally, select
|
To turn Copilot suggestions on or off globally, select
|
||||||
\inlineimage icons/copilot.png (\uicontrol {Toggle Copilot}). This also
|
\inlineimage icons/copilot.png (\uicontrol {Toggle Copilot}). This also
|
||||||
sets the value of \uicontrol {Enable Copilot} in \preferences >
|
sets the value of \uicontrol {Enable Copilot} in \preferences >
|
||||||
\uicontrol Copilot accordingly.
|
\uicontrol Copilot accordingly.
|
||||||
|
|
||||||
To turn Copilot suggestions on or off for a particular project,
|
\section2 Turn suggestions on or off for a project
|
||||||
go to \uicontrol Projects > \uicontrol {Project Settings} >
|
|
||||||
\uicontrol Copilot and then select or clear \uicontrol {Enable Copilot}.
|
To turn Copilot suggestions on or off for a particular project:
|
||||||
|
|
||||||
|
\list 1
|
||||||
|
\li Go to \uicontrol Projects > \uicontrol {Project Settings} >
|
||||||
|
\uicontrol Copilot.
|
||||||
|
\image qtcreator-project-settings-copilot.webp {Copilot project settings}
|
||||||
|
\li Clear \uicontrol {Use global settings}.
|
||||||
|
\li Select or clear \uicontrol {Enable Copilot}.
|
||||||
|
\endlist
|
||||||
|
|
||||||
\sa {Enable and disable plugins}, {Edit Mode}
|
\sa {Enable and disable plugins}, {Edit Mode}
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -58,7 +58,7 @@
|
|||||||
and \c <cur> to access the parameter and current value. Use \c <type> to
|
and \c <cur> to access the parameter and current value. Use \c <type> to
|
||||||
access the type and \c <T> for the template parameter.
|
access the type and \c <T> for the template parameter.
|
||||||
|
|
||||||
\image qtcreator-refactoring-options-templates.png {Settings for handling custom parameter types}
|
\image qtcreator-refactoring-options-templates.webp {Settings for handling custom parameter types}
|
||||||
|
|
||||||
Usually, arguments are passed by using a \c const reference. To pass
|
Usually, arguments are passed by using a \c const reference. To pass
|
||||||
arguments of a particular type as values, list them in the
|
arguments of a particular type as values, list them in the
|
||||||
|
|||||||
@@ -39,18 +39,18 @@
|
|||||||
\li \inlineimage icons/tutorials.png
|
\li \inlineimage icons/tutorials.png
|
||||||
\li \inlineimage icons/api-reference.png
|
\li \inlineimage icons/api-reference.png
|
||||||
\row
|
\row
|
||||||
\li \b {\l{Building and Running an Example}}
|
\li \b {\l{Tutorial: Build and run}{Building and Running an Example}}
|
||||||
|
|
||||||
To check that \l{https://www.qt.io/download-qt-installer}
|
To check that \l{https://www.qt.io/download-qt-installer}
|
||||||
{\QOI} created \l{Kits}
|
{\QOI} created \l{Kits}
|
||||||
{build and run kits}, open an example application and run it.
|
{build and run kits}, open an example application and run it.
|
||||||
If you have not done so before, go to
|
If you have not done so before, go to
|
||||||
\l{Building and Running an Example}.
|
\l{Tutorial: Build and run}.
|
||||||
\li \b {\l{Tutorials}}
|
\li \b {\l{Tutorials}}
|
||||||
|
|
||||||
Now you are ready to start developing your own applications.
|
Now you are ready to start developing your own applications.
|
||||||
Pick a tutorial to follow in \l{Tutorials}. To start developing
|
Pick a tutorial to follow in \l{Tutorials}. To start developing
|
||||||
for mobile devices, select \l{Creating a Mobile Application}.
|
for mobile devices, select \l{Tutorial: Mobile application}.
|
||||||
\li \b{\l {Qt Documentation}}
|
\li \b{\l {Qt Documentation}}
|
||||||
|
|
||||||
For more examples, as well as the details about using Qt tools
|
For more examples, as well as the details about using Qt tools
|
||||||
|
|||||||
@@ -150,7 +150,7 @@
|
|||||||
\list 1
|
\list 1
|
||||||
\li Select \uicontrol File > \uicontrol {New File} > \uicontrol {Qt} >
|
\li Select \uicontrol File > \uicontrol {New File} > \uicontrol {Qt} >
|
||||||
\uicontrol {Qt Resource File} > \uicontrol Choose.
|
\uicontrol {Qt Resource File} > \uicontrol Choose.
|
||||||
\image qtcreator-add-resource-wizard.png {New File dialog}
|
\image qtcreator-new-file-qrc.webp {New File dialog}
|
||||||
\li Follow the instructions of the wizard to create a resource
|
\li Follow the instructions of the wizard to create a resource
|
||||||
collection file (.qrc).
|
collection file (.qrc).
|
||||||
\li Open the resource file in the resource editor.
|
\li Open the resource file in the resource editor.
|
||||||
|
|||||||
@@ -14,7 +14,8 @@
|
|||||||
|
|
||||||
\ingroup creator-tutorials
|
\ingroup creator-tutorials
|
||||||
|
|
||||||
\title Building and Running an Example
|
\keyword {Building and Running an Example}
|
||||||
|
\title Tutorial: Build and run
|
||||||
|
|
||||||
\brief How to build and run a Qt example.
|
\brief How to build and run a Qt example.
|
||||||
|
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
which plugins you have installed. If you do not get to choose,
|
which plugins you have installed. If you do not get to choose,
|
||||||
the project usually uses CMake as the build system.
|
the project usually uses CMake as the build system.
|
||||||
|
|
||||||
\image qtcreator-new-project-build-system-qt-gui.png {Define Build System dialog}
|
\image qtcreator-new-project-build-system.webp {Define Build System dialog}
|
||||||
|
|
||||||
You can use wizards also to create plain C or C++ projects that use
|
You can use wizards also to create plain C or C++ projects that use
|
||||||
qmake, Qbs, or CMake, but do not use the Qt library.
|
qmake, Qbs, or CMake, but do not use the Qt library.
|
||||||
|
|||||||
@@ -91,7 +91,7 @@
|
|||||||
For more information about the project file settings, see
|
For more information about the project file settings, see
|
||||||
\l{Declaring Other Libraries}{qmake Manual: Declaring Other Libraries}.
|
\l{Declaring Other Libraries}{qmake Manual: Declaring Other Libraries}.
|
||||||
|
|
||||||
\sa {Using an Internal Library in a qmake Project}{Tutorial: Using an Internal Library in a qmake Project},
|
\sa {Tutorial: Use internal libraries with qmake},
|
||||||
{Add subprojects to projects}, {Add libraries to CMake projects},
|
{Add subprojects to projects}, {Add libraries to CMake projects},
|
||||||
{Use project wizards}, {Creating Projects}
|
{Use project wizards}, {Creating Projects}
|
||||||
*/
|
*/
|
||||||
@@ -103,7 +103,7 @@
|
|||||||
|
|
||||||
\ingroup creator-tutorials
|
\ingroup creator-tutorials
|
||||||
|
|
||||||
\title Using an Internal Library in a qmake Project
|
\title Tutorial: Use internal libraries with qmake
|
||||||
|
|
||||||
\brief How to create your own library and link your application against it
|
\brief How to create your own library and link your application against it
|
||||||
when using qmake as the build system.
|
when using qmake as the build system.
|
||||||
@@ -114,7 +114,7 @@
|
|||||||
\note This tutorial only applies when you select qmake as the build
|
\note This tutorial only applies when you select qmake as the build
|
||||||
system for the subdirs project.
|
system for the subdirs project.
|
||||||
|
|
||||||
\section1 Creating a shared library
|
\section1 Create a shared library
|
||||||
|
|
||||||
To create a shared library:
|
To create a shared library:
|
||||||
|
|
||||||
@@ -154,7 +154,7 @@
|
|||||||
list, select a subdirs project. For example, \e MyApplication.
|
list, select a subdirs project. For example, \e MyApplication.
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
\section1 Linking an application to the library
|
\section1 Link an application to the library
|
||||||
|
|
||||||
To link a project to the shared library:
|
To link a project to the shared library:
|
||||||
|
|
||||||
|
|||||||
@@ -59,7 +59,7 @@
|
|||||||
|
|
||||||
To change the values of environment variables for the build environment,
|
To change the values of environment variables for the build environment,
|
||||||
select the variable and then select \uicontrol Edit. Enter the new value
|
select the variable and then select \uicontrol Edit. Enter the new value
|
||||||
in the editor on the righ side.
|
in the editor on the right side.
|
||||||
|
|
||||||
To add new variables, select \uicontrol {Add}.
|
To add new variables, select \uicontrol {Add}.
|
||||||
|
|
||||||
|
|||||||
@@ -85,7 +85,7 @@
|
|||||||
\li \l{Specify clangd settings}{Clangd}
|
\li \l{Specify clangd settings}{Clangd}
|
||||||
\li \l{Specify Clang tools settings}{Clang Tools}
|
\li \l{Specify Clang tools settings}{Clang Tools}
|
||||||
\li \l{Override CMake settings for a project}{CMake}
|
\li \l{Override CMake settings for a project}{CMake}
|
||||||
\li \l{Set Copilot preferences}{Copilot}
|
\li \l{Turn suggestions on or off for a project}{Copilot}
|
||||||
\li \l{Configure C++ code model}{C++ Code Model}
|
\li \l{Configure C++ code model}{C++ Code Model}
|
||||||
\li \l{Specify code style}{C++ Code Style}
|
\li \l{Specify code style}{C++ Code Style}
|
||||||
\li \l{Set C++ file naming preferences}{C++ File Naming}
|
\li \l{Set C++ file naming preferences}{C++ File Naming}
|
||||||
|
|||||||
@@ -16,9 +16,10 @@
|
|||||||
\title Share project settings
|
\title Share project settings
|
||||||
|
|
||||||
\QC stores user-specific project settings in a \e {.user} file. You can
|
\QC stores user-specific project settings in a \e {.user} file. You can
|
||||||
share these settings between several projects as a \e {.shared} file. It
|
share these settings between several projects as a \e {.shared} file
|
||||||
has the same XML structure as a \e {.user} file, but only has the
|
(such as, \c {CMakeLists.txt.shared}, \c {qtcreator.pro.shared}, or
|
||||||
settings to share.
|
\c {qtcreator.qbs.shared}). It has the same XML structure as a \e {.user}
|
||||||
|
file, but only has the settings to share.
|
||||||
|
|
||||||
To share CMake project settings, use \l{CMake Presets} or a
|
To share CMake project settings, use \l{CMake Presets} or a
|
||||||
\c {CMakeLists.txt.shared} file.
|
\c {CMakeLists.txt.shared} file.
|
||||||
|
|||||||
@@ -35,8 +35,9 @@
|
|||||||
|
|
||||||
\section1 Set up PySide6
|
\section1 Set up PySide6
|
||||||
|
|
||||||
If you have not installed the required version of PySide6, \QC prompts you to
|
The recommended way to run PySide6 projects from \QC is to install PySide6
|
||||||
do so when you open a .py file.
|
for each project. \QC prompts you to do so the first time you open a .py file
|
||||||
|
for a project.
|
||||||
|
|
||||||
\image qtcreator-python-install.webp {Prompts to install PySide6 and Python language server}
|
\image qtcreator-python-install.webp {Prompts to install PySide6 and Python language server}
|
||||||
|
|
||||||
@@ -55,12 +56,6 @@
|
|||||||
\QD form, and the Qt Quick Application wizard creates a \c {.qml} file that
|
\QD form, and the Qt Quick Application wizard creates a \c {.qml} file that
|
||||||
imports Qt Quick controls.
|
imports Qt Quick controls.
|
||||||
|
|
||||||
\note Before importing UI classes and after editing them, create the Python
|
|
||||||
code from your UI form. In PySide6, run \c{pyside6-uic form.ui -o ui_form.py}
|
|
||||||
in the \l Terminal view.
|
|
||||||
|
|
||||||
\image qtcreator-new-qt-for-python-app-window-ui-uic.webp {Creating Python code in Terminal}
|
|
||||||
|
|
||||||
The \uicontrol Window wizard adds code to the source file, without the UI
|
The \uicontrol Window wizard adds code to the source file, without the UI
|
||||||
file.
|
file.
|
||||||
|
|
||||||
@@ -113,7 +108,7 @@
|
|||||||
\uicontrol {REPL Import File}. To also import all functions from
|
\uicontrol {REPL Import File}. To also import all functions from
|
||||||
the file, select \uicontrol {REPL Import *}.
|
the file, select \uicontrol {REPL Import *}.
|
||||||
|
|
||||||
\sa {Creating a Qt for Python Application with Qt Widgets},
|
\sa {Tutorial: Qt Widgets and Python}, {Tutorial: Qt Widgets UI and Python},
|
||||||
{Creating a Qt for Python Application with Qt Quick},
|
{Tutorial: Qt Quick and Python},
|
||||||
{Activate kits for a project}
|
{Activate kits for a project}
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -0,0 +1,115 @@
|
|||||||
|
// Copyright (C) 2024 The Qt Company Ltd.
|
||||||
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\page creator-tutorial-python-application-qt-widgets-ui.html
|
||||||
|
\previouspage creator-tutorials.html
|
||||||
|
\nextpage creator-how-tos.html
|
||||||
|
|
||||||
|
\ingroup creator-tutorials
|
||||||
|
|
||||||
|
\title Tutorial: Qt Widgets UI and Python
|
||||||
|
|
||||||
|
\brief How to develop a Qt widget-based application that contains a
|
||||||
|
\l {UI file} (.ui) with Python.
|
||||||
|
|
||||||
|
First, create a Qt for Python application project. Then, use the integrated
|
||||||
|
\QD to design a widgets-based UI.
|
||||||
|
|
||||||
|
\image qtcreator-new-project-python-window-ui-ready.webp {A small Qt Widgets application}
|
||||||
|
|
||||||
|
For more examples of creating Qt for Python applications, see
|
||||||
|
\l {https://doc.qt.io/qtforpython/tutorials/index.html}
|
||||||
|
{Qt for Python Examples and Tutorials}.
|
||||||
|
|
||||||
|
\section1 Create a window UI project
|
||||||
|
|
||||||
|
To create a Qt for Python application that has the source file for a main
|
||||||
|
class:
|
||||||
|
|
||||||
|
\list 1
|
||||||
|
\li Go to \uicontrol File > \uicontrol {New Project}.
|
||||||
|
\li Select \uicontrol {Application (Qt for Python)} >
|
||||||
|
\uicontrol {Window UI} > \uicontrol Choose to open the
|
||||||
|
\uicontrol {Project Location} dialog.
|
||||||
|
\image qtcreator-new-project-python-window-ui.webp {Project Location dialog}
|
||||||
|
\li In \uicontrol {Name}, enter the project name. For example,
|
||||||
|
\e {hello_world_ui}.
|
||||||
|
\li In \uicontrol {Create in}, enter the path for the project files.
|
||||||
|
For example, \c {C:\Examples}.
|
||||||
|
\li Select \uicontrol{Next} (on Windows and Linux) or \uicontrol Continue
|
||||||
|
(on \macos) to open the \uicontrol {Define Class} dialog.
|
||||||
|
\image qtcreator-new-project-python-window-ui-define-class.webp {Define Class dialog}
|
||||||
|
\li In \uicontrol {Class name}, select \b {MainWindow} as the class
|
||||||
|
name.
|
||||||
|
\li In \uicontrol {Base class}, select \b {QMainWindow} as the base class.
|
||||||
|
\note The \uicontrol {Source file} field is automatically updated to
|
||||||
|
match the name of the class.
|
||||||
|
\li In \uicontrol {Project file}, enter a name for the project file.
|
||||||
|
\li Select \uicontrol{Next} or \uicontrol Continue to open the
|
||||||
|
\uicontrol {Define Python Interpreter} dialog.
|
||||||
|
\image qtcreator-new-project-python-window-ui-define-python-interpreter.webp {Define Python Interpreter dialog}
|
||||||
|
\li In \uicontrol {PySide version}, select the PySide version of the
|
||||||
|
generated code.
|
||||||
|
\li Select \uicontrol {Next} or \uicontrol {Continue} to open the
|
||||||
|
\uicontrol {Kit Selection} dialog.
|
||||||
|
\image qtcreator-new-project-qt-for-python-kit-selection.webp {Selecting a kit for a Python project}
|
||||||
|
\li Select Python kits for building, deploying, and running the
|
||||||
|
project. By default, this creates a virtual environment for the
|
||||||
|
project inside the source directory. To use the global interpreter,
|
||||||
|
select the build configuration with the same name as the Python of
|
||||||
|
the kit in \uicontrol {Details}.
|
||||||
|
\li Select \uicontrol {Next} or \uicontrol {Continue}.
|
||||||
|
\li Review the project settings, and select \uicontrol {Finish} (on
|
||||||
|
Windows and Linux) or \uicontrol Done (on \macos) to create the
|
||||||
|
project.
|
||||||
|
\endlist
|
||||||
|
|
||||||
|
The wizard generates the following files:
|
||||||
|
|
||||||
|
\list
|
||||||
|
\li \c {form.ui}, which is the UI file for the window UI.
|
||||||
|
\li \c {hello_world_ui.pyproject}, which lists the files in the Python
|
||||||
|
project.
|
||||||
|
\li \c {mainwindow.py}, which has some boilerplate code for a class.
|
||||||
|
\li \c {reguirements.txt}, which stores the PySide version of the
|
||||||
|
generated code. You can use this file to install the required PySide
|
||||||
|
version using pip.
|
||||||
|
\endlist
|
||||||
|
|
||||||
|
\include creator-tutorial-python-application-qtquick.qdoc install-pyside6
|
||||||
|
|
||||||
|
\section1 Design a widgets-based UI
|
||||||
|
|
||||||
|
\list 1
|
||||||
|
\li In the \uicontrol {Edit} mode, double-click the \c {form.ui} file
|
||||||
|
in the \uicontrol{Projects} view to launch the integrated \QD.
|
||||||
|
\li Drag the following widgets from \uicontrol {Widget Box} to the form:
|
||||||
|
\list
|
||||||
|
\li \uicontrol {Text Edit} (QTextEdit)
|
||||||
|
\li \uicontrol {Check Box} (QCheckBox)
|
||||||
|
\li \uicontrol {Push Button} (QPushButton)
|
||||||
|
\endlist
|
||||||
|
\image qtcreator-new-project-python-window-ui-widgets.webp {Adding widgets to the UI}
|
||||||
|
\note To easily locate the widgets, use the search box at the top of the
|
||||||
|
\uicontrol {Widget Box}. For example, to find the \uicontrol {Text Edit}
|
||||||
|
widget, start typing the word \b text.
|
||||||
|
\li Double-click the \uicontrol {Text Edit} widget and enter the text
|
||||||
|
\b{Enter text here}.
|
||||||
|
\li Double-click the \uicontrol {Check Box} widget and enter the text
|
||||||
|
\b{Select me}.
|
||||||
|
\li Double-click the \uicontrol {Push Button} widget and enter the text
|
||||||
|
\b{Click me}.
|
||||||
|
\li Press \key {Ctrl+S} (or \key {Cmd+S}) to save your changes.
|
||||||
|
\endlist
|
||||||
|
|
||||||
|
For more information about designing UIs with \QD, see \l{\QD Manual}.
|
||||||
|
|
||||||
|
\section1 Run the application
|
||||||
|
|
||||||
|
Select the \inlineimage icons/run_small.png
|
||||||
|
button to run the application.
|
||||||
|
|
||||||
|
\sa {Tutorial: Qt Quick and Python}, {Tutorial: Qt Widgets and Python},
|
||||||
|
{Develop Qt for Python Applications}
|
||||||
|
*/
|
||||||
@@ -8,7 +8,8 @@
|
|||||||
|
|
||||||
\ingroup creator-tutorials
|
\ingroup creator-tutorials
|
||||||
|
|
||||||
\title Creating a Qt for Python Application with Qt Widgets
|
\keyword {Creating a Qt for Python Application with Qt Widgets}
|
||||||
|
\title Tutorial: Qt Widgets and Python
|
||||||
|
|
||||||
\brief How to develop a Qt widget-based application with Python.
|
\brief How to develop a Qt widget-based application with Python.
|
||||||
|
|
||||||
@@ -22,7 +23,7 @@
|
|||||||
\l {https://doc.qt.io/qtforpython/tutorials/index.html}
|
\l {https://doc.qt.io/qtforpython/tutorials/index.html}
|
||||||
{Qt for Python Examples and Tutorials}.
|
{Qt for Python Examples and Tutorials}.
|
||||||
|
|
||||||
\section1 Creating an Empty Window Project
|
\section1 Create an empty window project
|
||||||
|
|
||||||
To create a Qt for Python application that has the source file for a main
|
To create a Qt for Python application that has the source file for a main
|
||||||
class:
|
class:
|
||||||
@@ -75,7 +76,9 @@
|
|||||||
using pip.
|
using pip.
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
\section1 Adding Qt Widgets Imports
|
\include creator-tutorial-python-application-qtquick.qdoc install-pyside6
|
||||||
|
|
||||||
|
\section1 Add Qt Widgets imports
|
||||||
|
|
||||||
The wizard adds the imports to the \c mywidget.py source file for access to
|
The wizard adds the imports to the \c mywidget.py source file for access to
|
||||||
the QApplication and the base class you selected in the Qt Widgets module,
|
the QApplication and the base class you selected in the Qt Widgets module,
|
||||||
@@ -90,7 +93,7 @@
|
|||||||
from PySide6 import QtCore, QtWidgets
|
from PySide6 import QtCore, QtWidgets
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
\section1 Adding a Widgets-Based UI
|
\section1 Add a widgets-based UI
|
||||||
|
|
||||||
The wizard adds a main class with the specified name that inherits from the
|
The wizard adds a main class with the specified name that inherits from the
|
||||||
specified base class:
|
specified base class:
|
||||||
@@ -118,7 +121,7 @@
|
|||||||
...
|
...
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
\section1 Adding Signals and Slots
|
\section1 Add signals and slots
|
||||||
|
|
||||||
Then, add a signal and a slot to implement the random function:
|
Then, add a signal and a slot to implement the random function:
|
||||||
|
|
||||||
@@ -131,7 +134,7 @@
|
|||||||
self.text.setText(random.choice(self.hello))
|
self.text.setText(random.choice(self.hello))
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
\section1 Adding a Main Function
|
\section1 Add a main function
|
||||||
|
|
||||||
The wizard adds a main function, where it creates a QApplication instance. As
|
The wizard adds a main function, where it creates a QApplication instance. As
|
||||||
Qt can receive arguments from the command line, you can pass any arguments to
|
Qt can receive arguments from the command line, you can pass any arguments to
|
||||||
@@ -144,7 +147,7 @@
|
|||||||
...
|
...
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
\section1 Instantiating the MainWindow Class
|
\section1 Instantiate the MainWindow class
|
||||||
|
|
||||||
The wizard instantiates the \c MainWindow class and shows it:
|
The wizard instantiates the \c MainWindow class and shows it:
|
||||||
|
|
||||||
@@ -155,7 +158,7 @@
|
|||||||
...
|
...
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
\section1 Executing the Qt Code
|
\section1 Execute the Qt Code
|
||||||
|
|
||||||
Finally, the wizard calls the \c app.exec() method to enter the Qt
|
Finally, the wizard calls the \c app.exec() method to enter the Qt
|
||||||
main loop and start executing the Qt code:
|
main loop and start executing the Qt code:
|
||||||
@@ -165,11 +168,11 @@
|
|||||||
sys.exit(app.exec())
|
sys.exit(app.exec())
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
\section1 Running the Application
|
\section1 Run the application
|
||||||
|
|
||||||
Select the \inlineimage icons/run_small.png
|
Select the \inlineimage icons/run_small.png
|
||||||
button to run the application.
|
button to run the application.
|
||||||
|
|
||||||
\sa {Creating a Qt for Python Application with Qt Quick},
|
\sa {Tutorial: Qt Quick and Python}, {Tutorial: Qt Widgets UI and Python},
|
||||||
{Develop Qt for Python Applications}
|
{Develop Qt for Python Applications}
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -8,7 +8,8 @@
|
|||||||
|
|
||||||
\ingroup creator-tutorials
|
\ingroup creator-tutorials
|
||||||
|
|
||||||
\title Creating a Qt for Python Application with Qt Quick
|
\keyword {Creating a Qt for Python Application with Qt Quick}
|
||||||
|
\title Tutorial: Qt Quick and Python
|
||||||
|
|
||||||
\brief How to develop a Qt Quick application with Python.
|
\brief How to develop a Qt Quick application with Python.
|
||||||
|
|
||||||
@@ -22,7 +23,7 @@
|
|||||||
\l {https://doc.qt.io/qtforpython/tutorials/index.html}
|
\l {https://doc.qt.io/qtforpython/tutorials/index.html}
|
||||||
{Qt for Python Examples and Tutorials}.
|
{Qt for Python Examples and Tutorials}.
|
||||||
|
|
||||||
\section1 Creating an Empty Project
|
\section1 Create an empty project
|
||||||
|
|
||||||
To create a Qt for Python application that has a main QML file:
|
To create a Qt for Python application that has a main QML file:
|
||||||
|
|
||||||
@@ -65,7 +66,16 @@
|
|||||||
using pip.
|
using pip.
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
\section1 Adding Qt Quick Imports
|
//! [install-pyside6]
|
||||||
|
\section1 Install PySide6 for the project
|
||||||
|
|
||||||
|
In the \uicontrol {Edit} mode, select \uicontrol {Install} to set up PySide6
|
||||||
|
for the project.
|
||||||
|
|
||||||
|
\image qtcreator-python-install.webp {Prompt to install PySide6}
|
||||||
|
//! [install-pyside6]
|
||||||
|
|
||||||
|
\section1 Add Qt Quick imports
|
||||||
|
|
||||||
The wizard adds the following imports to the \c {main.py} source file for
|
The wizard adds the following imports to the \c {main.py} source file for
|
||||||
access to QGuiApplication and QQmlApplicationEngine:
|
access to QGuiApplication and QQmlApplicationEngine:
|
||||||
@@ -78,7 +88,7 @@
|
|||||||
from PySide6.QtQml import QQmlApplicationEngine
|
from PySide6.QtQml import QQmlApplicationEngine
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
\section1 Adding a Main Function
|
\section1 Add a main function
|
||||||
|
|
||||||
The wizard also adds a main function, where it creates a QGuiApplication
|
The wizard also adds a main function, where it creates a QGuiApplication
|
||||||
instance and passes system arguments to the QGuiApplication object:
|
instance and passes system arguments to the QGuiApplication object:
|
||||||
@@ -89,7 +99,7 @@
|
|||||||
...
|
...
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
\section1 Loading the QML File
|
\section1 Load the QML file
|
||||||
|
|
||||||
The following lines in the main class create a QQmlApplicationEngine
|
The following lines in the main class create a QQmlApplicationEngine
|
||||||
instance and load the generated QML file to the engine object:
|
instance and load the generated QML file to the engine object:
|
||||||
@@ -115,12 +125,12 @@
|
|||||||
...
|
...
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
\section1 Designing the UI
|
\section1 Design the UI
|
||||||
|
|
||||||
Open the \c {main.qml} file in the \uicontrol Edit mode to design a
|
Open the \c {main.qml} file in the \uicontrol Edit mode to design a
|
||||||
Qt Quick UI.
|
Qt Quick UI.
|
||||||
|
|
||||||
\section2 Adding Imports
|
\section2 Add imports
|
||||||
|
|
||||||
Add imports for Qt Quick Controls and Layouts:
|
Add imports for Qt Quick Controls and Layouts:
|
||||||
|
|
||||||
@@ -131,7 +141,7 @@
|
|||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
\section2 Adding Properties and Functions
|
\section2 Add properties and functions
|
||||||
|
|
||||||
The wizard adds a main window:
|
The wizard adds a main window:
|
||||||
|
|
||||||
@@ -158,7 +168,7 @@
|
|||||||
}
|
}
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
\section2 Adding Qt Quick Controls
|
\section2 Add Qt Quick Controls
|
||||||
|
|
||||||
Add \l {Text} and \l {Button} QML types within a \l {ColumnLayout} type to
|
Add \l {Text} and \l {Button} QML types within a \l {ColumnLayout} type to
|
||||||
design the UI:
|
design the UI:
|
||||||
@@ -182,11 +192,10 @@
|
|||||||
|
|
||||||
You can also use \l{Qt Design Studio Manual}{\QDS} to design Qt Quick UIs.
|
You can also use \l{Qt Design Studio Manual}{\QDS} to design Qt Quick UIs.
|
||||||
|
|
||||||
\section1 Running the Application
|
\section1 Run the application
|
||||||
|
|
||||||
Select the \inlineimage icons/run_small.png
|
Select \inlineimage icons/run_small.png to run the application.
|
||||||
button to run the application.
|
|
||||||
|
|
||||||
\sa {Creating a Qt for Python Application with Qt Widgets},
|
\sa {Tutorial: Qt Widgets and Python}, {Tutorial: Qt Widgets UI and Python},
|
||||||
{Develop Qt for Python Applications}
|
{Develop Qt for Python Applications}
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -7,7 +7,8 @@
|
|||||||
\nextpage creator-how-tos.html
|
\nextpage creator-how-tos.html
|
||||||
\ingroup creator-tutorials
|
\ingroup creator-tutorials
|
||||||
|
|
||||||
\title Creating a Mobile Application
|
\keyword {Creating a Mobile Application}
|
||||||
|
\title Tutorial: Mobile application
|
||||||
|
|
||||||
\brief How to create a Qt Quick application that uses Qt Quick Controls and
|
\brief How to create a Qt Quick application that uses Qt Quick Controls and
|
||||||
runs on Android and iOS devices.
|
runs on Android and iOS devices.
|
||||||
@@ -24,7 +25,7 @@
|
|||||||
|
|
||||||
\image creator_android_tutorial_ex_app.png
|
\image creator_android_tutorial_ex_app.png
|
||||||
|
|
||||||
\section1 Setting up the Development Environment
|
\section1 Set up the development environment
|
||||||
|
|
||||||
To build the application for and run it on a mobile device, you must
|
To build the application for and run it on a mobile device, you must
|
||||||
set up the development environment for the device platform and configure a
|
set up the development environment for the device platform and configure a
|
||||||
@@ -41,7 +42,7 @@
|
|||||||
|
|
||||||
\include qtquick-tutorial-create-empty-project.qdocinc qtquick empty application
|
\include qtquick-tutorial-create-empty-project.qdocinc qtquick empty application
|
||||||
|
|
||||||
\section1 Adding Images as Resources
|
\section1 Add images as resources
|
||||||
|
|
||||||
The main view of the application displays an SVG bubble image that moves
|
The main view of the application displays an SVG bubble image that moves
|
||||||
around the screen when you tilt the device.
|
around the screen when you tilt the device.
|
||||||
@@ -54,7 +55,7 @@
|
|||||||
\skipto qt_add_qml_module
|
\skipto qt_add_qml_module
|
||||||
\printuntil )
|
\printuntil )
|
||||||
|
|
||||||
\section1 Creating the Accelbubble Main View
|
\section1 Create the Accelbubble main view
|
||||||
|
|
||||||
Create the main view in the \e main.qml file by adding an \l Image
|
Create the main view in the \e main.qml file by adding an \l Image
|
||||||
component with \e Bluebubble.svg as the source:
|
component with \e Bluebubble.svg as the source:
|
||||||
@@ -113,7 +114,7 @@
|
|||||||
\printuntil }
|
\printuntil }
|
||||||
\printuntil }
|
\printuntil }
|
||||||
|
|
||||||
\section1 Locking Device Orientation
|
\section1 Lock device orientation
|
||||||
|
|
||||||
The device display is rotated by default when the device orientation
|
The device display is rotated by default when the device orientation
|
||||||
changes between portrait and landscape. For this example, it would be
|
changes between portrait and landscape. For this example, it would be
|
||||||
@@ -153,7 +154,7 @@
|
|||||||
\skipto set_target_properties
|
\skipto set_target_properties
|
||||||
\printuntil )
|
\printuntil )
|
||||||
|
|
||||||
\section1 Adding Dependencies
|
\section1 Add dependencies
|
||||||
|
|
||||||
You must tell the build system which Qt modules your application needs by
|
You must tell the build system which Qt modules your application needs by
|
||||||
specifying dependencies in the project file. Select \uicontrol Projects to
|
specifying dependencies in the project file. Select \uicontrol Projects to
|
||||||
@@ -184,7 +185,7 @@
|
|||||||
For more information about the CMakeLists.txt file, see
|
For more information about the CMakeLists.txt file, see
|
||||||
\l{Getting started with CMake}.
|
\l{Getting started with CMake}.
|
||||||
|
|
||||||
\section1 Running the Application
|
\section1 Run the application
|
||||||
|
|
||||||
You can now deploy the application to a device:
|
You can now deploy the application to a device:
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,8 @@
|
|||||||
\nextpage creator-how-tos.html
|
\nextpage creator-how-tos.html
|
||||||
\ingroup creator-tutorials
|
\ingroup creator-tutorials
|
||||||
|
|
||||||
\title Creating a Qt Quick Application
|
\keyword {Creating a Qt Quick Application}
|
||||||
|
\title Tutorial: Qt Quick application
|
||||||
|
|
||||||
\brief How to create a Qt Quick Application in the \uicontrol Edit mode.
|
\brief How to create a Qt Quick Application in the \uicontrol Edit mode.
|
||||||
|
|
||||||
@@ -33,7 +34,7 @@
|
|||||||
\QC generates a component file, \e Main.qml, and opens it in the
|
\QC generates a component file, \e Main.qml, and opens it in the
|
||||||
\uicontrol Edit mode.
|
\uicontrol Edit mode.
|
||||||
|
|
||||||
\section1 Deploying Applications
|
\section1 Deploy applications
|
||||||
|
|
||||||
The main view of the application displays a Qt logo inside a rectangle in
|
The main view of the application displays a Qt logo inside a rectangle in
|
||||||
the top left corner of the view and two empty rectangles.
|
the top left corner of the view and two empty rectangles.
|
||||||
@@ -46,7 +47,7 @@
|
|||||||
\skipto qt_add_qml_module
|
\skipto qt_add_qml_module
|
||||||
\printuntil )
|
\printuntil )
|
||||||
|
|
||||||
\section1 Creating Custom QML Types
|
\section1 Create a custom QML type
|
||||||
|
|
||||||
Because the \l Window QML type requires that you add states into child
|
Because the \l Window QML type requires that you add states into child
|
||||||
components, use the wizard to create a custom QML type called
|
components, use the wizard to create a custom QML type called
|
||||||
@@ -58,7 +59,7 @@
|
|||||||
\li Go to \uicontrol File > \uicontrol {New File}.
|
\li Go to \uicontrol File > \uicontrol {New File}.
|
||||||
\li Select \uicontrol Qt > \uicontrol {QML File (Qt Quick 2)}.
|
\li Select \uicontrol Qt > \uicontrol {QML File (Qt Quick 2)}.
|
||||||
\li Select \uicontrol Choose to open the \uicontrol Location dialog.
|
\li Select \uicontrol Choose to open the \uicontrol Location dialog.
|
||||||
\li In the \uicontrol {File name} field, enter a name for the custom
|
\li In \uicontrol {File name}, enter a name for the custom
|
||||||
QML type: \e Page.
|
QML type: \e Page.
|
||||||
\li Select \uicontrol Next to open the \uicontrol {Project Management}
|
\li Select \uicontrol Next to open the \uicontrol {Project Management}
|
||||||
dialog.
|
dialog.
|
||||||
@@ -117,7 +118,7 @@
|
|||||||
Next, make the image move between the rectangles when users click
|
Next, make the image move between the rectangles when users click
|
||||||
them by adding states and by connecting mouse clicks to state changes.
|
them by adding states and by connecting mouse clicks to state changes.
|
||||||
|
|
||||||
\section1 Connecting Mouse Clicks to State Changes
|
\section1 Connect mouse clicks to state changes
|
||||||
|
|
||||||
To make the image move between the rectangles when users click them, add
|
To make the image move between the rectangles when users click them, add
|
||||||
states to the Page component where you change the values of the \c x and
|
states to the Page component where you change the values of the \c x and
|
||||||
@@ -139,7 +140,7 @@
|
|||||||
|
|
||||||
Because you develop with Qt 6, you must specify the connections as functions.
|
Because you develop with Qt 6, you must specify the connections as functions.
|
||||||
|
|
||||||
\section1 Adding Page to the Main View
|
\section1 Add Page to the main view
|
||||||
|
|
||||||
Open \e Main.qml for editing and add an instance of the Page custom
|
Open \e Main.qml for editing and add an instance of the Page custom
|
||||||
component to it:
|
component to it:
|
||||||
@@ -151,7 +152,7 @@
|
|||||||
Press \key {Ctrl+R} to run the application, and click the rectangles to
|
Press \key {Ctrl+R} to run the application, and click the rectangles to
|
||||||
move the Qt logo from one rectangle to another.
|
move the Qt logo from one rectangle to another.
|
||||||
|
|
||||||
\section1 Animating Transitions
|
\section1 Animate transitions
|
||||||
|
|
||||||
Create transitions to apply animation to the image. For example,
|
Create transitions to apply animation to the image. For example,
|
||||||
the image bounces back when it moves to \e middleRightRect and eases into
|
the image bounces back when it moves to \e middleRightRect and eases into
|
||||||
|
|||||||
@@ -95,9 +95,9 @@
|
|||||||
\QC creates a QML file, \e Main.qml, that you can modify in the
|
\QC creates a QML file, \e Main.qml, that you can modify in the
|
||||||
\uicontrol Edit mode.
|
\uicontrol Edit mode.
|
||||||
|
|
||||||
\sa {Create Qt Quick UI Prototypes}, {Creating a Mobile Application},
|
\sa {Create Qt Quick UI Prototypes}, {Tutorial: Mobile application},
|
||||||
{Creating a Qt for Python Application with Qt Quick},
|
{Tutorial: Qt Quick and Python},
|
||||||
{Creating a Qt Quick Application}, {Creating Projects},
|
{Tutorial: Qt Quick application}, {Creating Projects},
|
||||||
{Developing Qt Quick Applications}
|
{Developing Qt Quick Applications}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -4,11 +4,11 @@
|
|||||||
/*!
|
/*!
|
||||||
//! [qtquick empty application]
|
//! [qtquick empty application]
|
||||||
|
|
||||||
\section1 Creating the Project
|
\section1 Create the project
|
||||||
|
|
||||||
\list 1
|
\list 1
|
||||||
|
|
||||||
\li Select \uicontrol File > \uicontrol {New Project} >
|
\li Go to \uicontrol File > \uicontrol {New Project} >
|
||||||
\uicontrol {Application (Qt)} > \uicontrol {Qt Quick Application}.
|
\uicontrol {Application (Qt)} > \uicontrol {Qt Quick Application}.
|
||||||
|
|
||||||
\image qtcreator-project-qt-quick.webp {New Project dialog}
|
\image qtcreator-project-qt-quick.webp {New Project dialog}
|
||||||
@@ -16,11 +16,11 @@
|
|||||||
\li Select \uicontrol Choose to open the
|
\li Select \uicontrol Choose to open the
|
||||||
\uicontrol {Project Location} dialog.
|
\uicontrol {Project Location} dialog.
|
||||||
|
|
||||||
\li In the \uicontrol Name field, enter a name for the application.
|
\li In \uicontrol Name, enter a name for the application.
|
||||||
When naming your own projects, keep in mind that you cannot
|
When naming your own projects, keep in mind that you cannot
|
||||||
easily rename them later.
|
easily rename them later.
|
||||||
|
|
||||||
\li In the \uicontrol {Create in} field, enter the path for the project
|
\li In \uicontrol {Create in}, enter the path for the project
|
||||||
files. You can move project folders later without problems.
|
files. You can move project folders later without problems.
|
||||||
|
|
||||||
\li Select \uicontrol Next to open the
|
\li Select \uicontrol Next to open the
|
||||||
@@ -28,11 +28,10 @@
|
|||||||
|
|
||||||
\image qtcreator-project-qt-quick-details.webp {Define Project Details dialog}
|
\image qtcreator-project-qt-quick-details.webp {Define Project Details dialog}
|
||||||
|
|
||||||
\li Deselect the \uicontrol {Create a project that you can open in \QDS}
|
\li Clear \uicontrol {Create a project that you can open in \QDS}.
|
||||||
check box.
|
|
||||||
|
|
||||||
\note This tutorial shows how to create the application in the
|
\note This tutorial shows how to create the application in the
|
||||||
\uicontrol Edit mode. If you leave the check box selected, the
|
\uicontrol Edit mode. If you leave the checkbox selected, the
|
||||||
following instructions won't apply.
|
following instructions won't apply.
|
||||||
|
|
||||||
\li Select \uicontrol Next to open the \uicontrol {Kit Selection} dialog.
|
\li Select \uicontrol Next to open the \uicontrol {Kit Selection} dialog.
|
||||||
|
|||||||
@@ -107,6 +107,6 @@
|
|||||||
To pin toolbars by default, select \uicontrol {Pin Qt Quick Toolbar}.
|
To pin toolbars by default, select \uicontrol {Pin Qt Quick Toolbar}.
|
||||||
|
|
||||||
\if defined(qtcreator)
|
\if defined(qtcreator)
|
||||||
\sa {Creating a Qt Quick Application}
|
\sa {Tutorial: Qt Quick application}
|
||||||
\endif
|
\endif
|
||||||
*/
|
*/
|
||||||
|
|||||||
760
doc/qtcreator/src/reference/creator-sdk-tool.qdoc
Normal file
@@ -0,0 +1,760 @@
|
|||||||
|
// Copyright (C) 2024 The Qt Company Ltd.
|
||||||
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
|
||||||
|
|
||||||
|
/*!
|
||||||
|
\page creator-sdk-tool.html
|
||||||
|
\previouspage creator-reference.html
|
||||||
|
|
||||||
|
\ingroup creator-reference
|
||||||
|
|
||||||
|
\title SDK Tool
|
||||||
|
|
||||||
|
\brief Configure CMake and set up compilers, debuggers, devices, Qt versions,
|
||||||
|
and kits from the command line.
|
||||||
|
|
||||||
|
\QOI uses the SDK Tool (\c sdktool) to configure CMake and set \l {Kits}{Kit}
|
||||||
|
preferences, such as compilers, debuggers, devices, and Qt versions. You can
|
||||||
|
use it from the command line to set Qt and \QC preferences automatically for
|
||||||
|
all users of a computer, for example. For a single user, it is usually easier
|
||||||
|
to make changes in \preferences > \uicontrol Kits.
|
||||||
|
|
||||||
|
To use the SDK Tool, enter the following command in the \c {Tools\sdktool\bin}
|
||||||
|
directory in the Qt installation directory:
|
||||||
|
|
||||||
|
\badcode
|
||||||
|
sdktool [OPTION] [OPERATION [OPTIONS]]
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
For information about the options and operations that your SDK Tool version
|
||||||
|
supports, enter:
|
||||||
|
|
||||||
|
\badcode
|
||||||
|
sdktool --help
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
\section1 Value Types
|
||||||
|
|
||||||
|
The operations add settings in the form \c {<KEY> <TYPE>:<VALUE>} to the
|
||||||
|
configuration that they create. The supported \c TYPE values are:
|
||||||
|
|
||||||
|
\list
|
||||||
|
\li \c bool
|
||||||
|
\li \c int
|
||||||
|
\li \l QByteArray
|
||||||
|
\li \l QString
|
||||||
|
\li \l QVariantList
|
||||||
|
\endlist
|
||||||
|
|
||||||
|
\section1 SDK Path
|
||||||
|
|
||||||
|
\QOI and the \QC stand-alone installer both install \c sdktool. The
|
||||||
|
\c sdktool from an installer defaults to the location from where the \QC
|
||||||
|
from the installer reads the information that the SDK Tool writes.
|
||||||
|
To point \c sdktool to some other \QC installation, set \c --sdkpath
|
||||||
|
depending on whether you use \QOI or an offline installer.
|
||||||
|
|
||||||
|
\list
|
||||||
|
\li \QOI: \c {<Qt_Online_Installer>/Tools/sdktool}
|
||||||
|
\li \QC stand-alone installer:
|
||||||
|
\list
|
||||||
|
\li On Windows and Linux: \c {<qtcreator>/share/qtcreator/}
|
||||||
|
\li On \macos \c {Qt Creator.app/Contents/Resources/}
|
||||||
|
\endlist
|
||||||
|
\endlist
|
||||||
|
|
||||||
|
\section1 Options
|
||||||
|
|
||||||
|
The following table summarizes the available options.
|
||||||
|
|
||||||
|
\table
|
||||||
|
\header
|
||||||
|
\li Option
|
||||||
|
\li Description
|
||||||
|
\row
|
||||||
|
\li \c {--help | -h}
|
||||||
|
\li Display help on SDK tool options.
|
||||||
|
|
||||||
|
Enter \c {--help <OPERATION>} to get help on the options
|
||||||
|
required for the operation.
|
||||||
|
\row
|
||||||
|
\li \c {--sdkpath=<PATH> | -s <PATH>}
|
||||||
|
\li Set the path to the files that the SDK tool writes.
|
||||||
|
\endtable
|
||||||
|
|
||||||
|
\section1 Operations
|
||||||
|
|
||||||
|
The following table summarizes the available operations.
|
||||||
|
|
||||||
|
\table
|
||||||
|
\header
|
||||||
|
\li Operation
|
||||||
|
\li Description
|
||||||
|
\row
|
||||||
|
\li addAbiFlavor
|
||||||
|
\li Add a system architecture (ABI).
|
||||||
|
\row
|
||||||
|
\li \c {addCMake}
|
||||||
|
\li Add the path to a CMake tool.
|
||||||
|
\row
|
||||||
|
\li \c {addDebugger}
|
||||||
|
\li Add a debugger.
|
||||||
|
\row
|
||||||
|
\li \c {addDev}
|
||||||
|
\li Add a device.
|
||||||
|
\row
|
||||||
|
\li \c {addKeys}
|
||||||
|
\li Add settings as \c {<KEY> <TYPE>:<VALUE>} key-value pairs.
|
||||||
|
\row
|
||||||
|
\li \c {addKit}
|
||||||
|
\li Add a build and run kit.
|
||||||
|
\row
|
||||||
|
\li \c {addQt}
|
||||||
|
\li Add a Qt version.
|
||||||
|
\row
|
||||||
|
\li \c {addTC}
|
||||||
|
\li Add a compiler.
|
||||||
|
\row
|
||||||
|
\li \c {find}
|
||||||
|
\li Find a setting value.
|
||||||
|
\row
|
||||||
|
\li \c {findKey}
|
||||||
|
\li Find a setting key.
|
||||||
|
\row
|
||||||
|
\li \c {get}
|
||||||
|
\li Get settings.
|
||||||
|
\row
|
||||||
|
\li \c {rmCMake}
|
||||||
|
\li Remove the path to a CMake tool.
|
||||||
|
\row
|
||||||
|
\li \c {rmDebugger}
|
||||||
|
\li Remove a debugger.
|
||||||
|
\row
|
||||||
|
\li \c {rmDev}
|
||||||
|
\li Remove a device
|
||||||
|
\row
|
||||||
|
\li \c {rmKeys}
|
||||||
|
\li Remove settings.
|
||||||
|
\row
|
||||||
|
\li \c {rmQt}
|
||||||
|
\li Remove a Qt version.
|
||||||
|
\row
|
||||||
|
\li \c {rmTC}
|
||||||
|
\li Remove a compiler.
|
||||||
|
\endtable
|
||||||
|
|
||||||
|
\section1 Adding a System Architecture (ABI)
|
||||||
|
|
||||||
|
\section2 addAbiFlavor
|
||||||
|
|
||||||
|
\badcode
|
||||||
|
sdktool addAbiFlavor --flavor <NAME> --oses <OS>(,<OS>)*
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
\section2 addAbiFlavor Options
|
||||||
|
|
||||||
|
The following table summarizes the available options.
|
||||||
|
|
||||||
|
\table
|
||||||
|
\header
|
||||||
|
\li Option
|
||||||
|
\li Description
|
||||||
|
\li Required
|
||||||
|
\row
|
||||||
|
\li \c {--flavor <NAME>}
|
||||||
|
\li Name of the system architecture (ABI).
|
||||||
|
\li \inlineimage ok.png
|
||||||
|
\row
|
||||||
|
\li \c {--oses <OS>(,<OS>)*}
|
||||||
|
\li Operating system that the ABI applies to.
|
||||||
|
\li \inlineimage ok.png
|
||||||
|
\endtable
|
||||||
|
|
||||||
|
\section2 ABI Flavor Example
|
||||||
|
|
||||||
|
To add Yocto Poky on Linux, enter:
|
||||||
|
|
||||||
|
\badcode
|
||||||
|
./sdktool addAbiFlavor \
|
||||||
|
--flavor poky \
|
||||||
|
--oses linux
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
\section1 Adding CMake Tools
|
||||||
|
|
||||||
|
\section2 addCMake
|
||||||
|
|
||||||
|
\badcode
|
||||||
|
sdktool addCMake --id <ID> --name <NAME> --path <PATH> [<KEY> <TYPE:VALUE>]
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
\section2 addCMake Options
|
||||||
|
|
||||||
|
The following table summarizes the available options.
|
||||||
|
|
||||||
|
\table
|
||||||
|
\header
|
||||||
|
\li Option
|
||||||
|
\li Description
|
||||||
|
\li Required
|
||||||
|
\row
|
||||||
|
\li \c {--id <ID>}
|
||||||
|
\li ID of the CMake installation. Can be any ASCII (7-bit) string.
|
||||||
|
|
||||||
|
If you do not use a version number in the string, the registered
|
||||||
|
CMake keeps the ID when you update this CMake installation, and
|
||||||
|
therefore, all kits are automatically updated to use the new
|
||||||
|
version.
|
||||||
|
\li \inlineimage ok.png
|
||||||
|
\row
|
||||||
|
\li \c {--name <NAME>}
|
||||||
|
\li Name of the CMake installation.
|
||||||
|
\li \inlineimage ok.png
|
||||||
|
\row
|
||||||
|
\li \c {--path <PATH>}
|
||||||
|
\li Path to the CMake executable.
|
||||||
|
\li \inlineimage ok.png
|
||||||
|
\row
|
||||||
|
\li \c {<KEY> <TYPE:VALUE>}
|
||||||
|
\li Additional settings as key-value pairs.
|
||||||
|
\li
|
||||||
|
\endtable
|
||||||
|
|
||||||
|
For more information, see \l{Add CMake tools}.
|
||||||
|
|
||||||
|
\section2 CMake Configuration Example
|
||||||
|
|
||||||
|
To add a CMake tool on Windows, enter:
|
||||||
|
|
||||||
|
\badcode
|
||||||
|
sdktool addCMake \
|
||||||
|
--id "my.custom.cmake" \
|
||||||
|
--name "Custom CMake" \
|
||||||
|
--path "C:\Program Files\CMake-3.30\bin\cmake.exe"
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
\section1 Adding Compilers
|
||||||
|
|
||||||
|
\section2 addTC
|
||||||
|
|
||||||
|
\badcode
|
||||||
|
sdktool addTC --id <ID> --language <ID> --name <NAME> --path <PATH> --abi <ABI STRING> [OPTIONS]
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
\section2 addTC Options
|
||||||
|
|
||||||
|
The following table summarizes the available options.
|
||||||
|
|
||||||
|
\table
|
||||||
|
\header
|
||||||
|
\li Option
|
||||||
|
\li Description
|
||||||
|
\li Required
|
||||||
|
\row
|
||||||
|
\li \c {--abi <ABI STRING>}
|
||||||
|
\li ABI of the compiler in a format that
|
||||||
|
\c {ProjectExplorer::Abi::fromString()} can parse.
|
||||||
|
\li \inlineimage ok.png
|
||||||
|
\row
|
||||||
|
\li \c {--id <ID>}
|
||||||
|
\li ID of the toolchain in the format \c {ToolChainType:some_unique_part},
|
||||||
|
where the toolchain type can be one of the following, or something
|
||||||
|
else provided by a plugin:
|
||||||
|
\list
|
||||||
|
\li \c {ProjectExplorer.ToolChain.Msvc} for Microsoft MSVC
|
||||||
|
compilers. This compiler is automatically detected, so
|
||||||
|
you don't need to add it with the SDK tool.
|
||||||
|
\li \c {ProjectExplorer.ToolChain.Gcc} for GCC on Linux or
|
||||||
|
\macos.
|
||||||
|
\li \c {ProjectExplorer.ToolChain.Clang} for Clang.
|
||||||
|
\li \c {ProjectExplorer.ToolChain.LinuxIcc} for LinuxICC.
|
||||||
|
\li \c {ProjectExplorer.ToolChain.Mingw} for MinGW.
|
||||||
|
\li \c {ProjectExplorer.ToolChain.ClangCl} for Clang/CL.
|
||||||
|
\li \c {ProjectExplorer.ToolChain.Custom} for a custom
|
||||||
|
toolchain.
|
||||||
|
\li \c {Qt4ProjectManager.ToolChain.Android} for Android.
|
||||||
|
\li \c {Qnx.QccToolChain} for QNX QCC.
|
||||||
|
\li \c {WebAssembly.ToolChain.Emscripten} for Emscripten.
|
||||||
|
\endlist
|
||||||
|
Check the classes derived from \c {ProjectExplorer::ToolChain}
|
||||||
|
for their IDs.
|
||||||
|
|
||||||
|
\c {some_unique_part} can be anything. \QC uses GUIDs by default.
|
||||||
|
\li \inlineimage ok.png
|
||||||
|
\row
|
||||||
|
\li \c {--language <ID>}
|
||||||
|
\li ID of the input language of the toolchain: \c C or \c Cxx.
|
||||||
|
\li \inlineimage ok.png
|
||||||
|
\row
|
||||||
|
\li \c {--name <NAME>}
|
||||||
|
\li Name of the toolchain.
|
||||||
|
\li \inlineimage ok.png
|
||||||
|
\row
|
||||||
|
\li \c {--path <PATH>}
|
||||||
|
\li Path to the compiler executable.
|
||||||
|
\li \inlineimage ok.png
|
||||||
|
\row
|
||||||
|
\li \c {--supportedAbis <ABI STRING>,<ABI STRING>}
|
||||||
|
\li List of ABIs that the compiler supports.
|
||||||
|
\li
|
||||||
|
\row
|
||||||
|
\li \c {<KEY> <TYPE:VALUE>}
|
||||||
|
\li Additional settings as key-value pairs.
|
||||||
|
\li
|
||||||
|
\endtable
|
||||||
|
|
||||||
|
For more information, see \l{Add compilers}.
|
||||||
|
|
||||||
|
\section2 Compiler Example
|
||||||
|
|
||||||
|
To add a GCC compiler on Linux, enter:
|
||||||
|
|
||||||
|
\badcode
|
||||||
|
./sdktool addTC \
|
||||||
|
--id "ProjectExplorer.ToolChain.Gcc:company.product.toolchain.g++" \
|
||||||
|
--language Cxx
|
||||||
|
--name "GCC (C++, x86_64)" \
|
||||||
|
--path /home/code/build/gcc-6.3/usr/bin/g++ \
|
||||||
|
--abi x86-linux-generic-elf-64bit \
|
||||||
|
--supportedAbis x86-linux-generic-elf-64bit,x86-linux-generic-elf-32bit \
|
||||||
|
ADDITIONAL_INTEGER_PARAMETER int:42 \
|
||||||
|
ADDITIONAL_STRING_PARAMETER "QString:some string" \
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
\section1 Adding Debuggers
|
||||||
|
|
||||||
|
\section2 addDebugger
|
||||||
|
|
||||||
|
\badcode
|
||||||
|
sdktool addDebugger --id <ID> --name <NAME> [OPTIONS]
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
\section2 addDebugger Options
|
||||||
|
|
||||||
|
The following table summarizes the available options.
|
||||||
|
|
||||||
|
\table
|
||||||
|
\header
|
||||||
|
\li Option
|
||||||
|
\li Description
|
||||||
|
\li Required
|
||||||
|
\row
|
||||||
|
\li \c {--abis <ABI,ABI>}
|
||||||
|
\li Comma-separated list of system architecture definitions.
|
||||||
|
\li
|
||||||
|
\row
|
||||||
|
\li \c {--binary <PATH>}
|
||||||
|
\li Path to the debugger executable. Can be an absolute path, the
|
||||||
|
value \c auto, or an ABI. Finds the appropriate debugger for MSVC
|
||||||
|
toolchains where \QC does not know the binary path.
|
||||||
|
\li
|
||||||
|
\row
|
||||||
|
\li \c {--engine <ENGINE>}
|
||||||
|
\li Debugger engine type:
|
||||||
|
\list
|
||||||
|
\li 1 for GDB
|
||||||
|
\li 4 for CDB
|
||||||
|
\li 8 for PDB
|
||||||
|
\li 256 for LLDB
|
||||||
|
\li 512 for GDB DAP
|
||||||
|
\li 1024 for LLDB DAP
|
||||||
|
\li 4096 for uVision Debugger
|
||||||
|
\endlist
|
||||||
|
\li
|
||||||
|
\row
|
||||||
|
\li \c {--id <ID>}
|
||||||
|
\li Unique ID of the debugger.
|
||||||
|
\li \inlineimage ok.png
|
||||||
|
\row
|
||||||
|
\li \c {--name <NAME>}
|
||||||
|
\li Name of the debugger.
|
||||||
|
\li \inlineimage ok.png
|
||||||
|
\row
|
||||||
|
\li \c {<KEY> <TYPE:VALUE>}
|
||||||
|
\li Additional settings as key-value pairs.
|
||||||
|
\li
|
||||||
|
\endtable
|
||||||
|
|
||||||
|
For more information, see \l{Add debuggers}.
|
||||||
|
|
||||||
|
\section2 Debugger Example
|
||||||
|
|
||||||
|
To add a GDB debugger on Linux, enter:
|
||||||
|
|
||||||
|
\badcode
|
||||||
|
./sdktool addDebugger \
|
||||||
|
--id "company.product.toolchain.gdb" \
|
||||||
|
--name "GDB (company, product)" \
|
||||||
|
--engine 1 \
|
||||||
|
--binary /home/code/build/gdb-7.12/bin/gdb \
|
||||||
|
--abis arm-linux-generic-elf-32 \
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
\section1 Adding Devices
|
||||||
|
|
||||||
|
\section2 addDev
|
||||||
|
|
||||||
|
\badcode
|
||||||
|
sdktool addDev --id <ID> --name <NAME> --type <INT> [OPTIONS]
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
\section2 addDev Options
|
||||||
|
|
||||||
|
The following table summarizes the available options. The options to use
|
||||||
|
depend on the device type.
|
||||||
|
|
||||||
|
\table
|
||||||
|
\header
|
||||||
|
\li Option
|
||||||
|
\li Description
|
||||||
|
\li Required
|
||||||
|
\row
|
||||||
|
\li \c {--authentication <INT>}
|
||||||
|
\li Authentication method:
|
||||||
|
\list
|
||||||
|
\li 1 for all authentication methods
|
||||||
|
\li 2 for SSH authentication using a public and private key
|
||||||
|
pair
|
||||||
|
\endlist
|
||||||
|
\li
|
||||||
|
\row
|
||||||
|
\li \c {--b2qHardware <STRING>}
|
||||||
|
\li Boot to Qt platform info about hardware.
|
||||||
|
\li
|
||||||
|
\row
|
||||||
|
\li \c {--b2qSoftware <STRING>}
|
||||||
|
\li Boot to Qt platform info about software.
|
||||||
|
\li
|
||||||
|
\row
|
||||||
|
\li \c {--debugServerKey <STRING>}
|
||||||
|
\li Debug server key.
|
||||||
|
\li
|
||||||
|
\row
|
||||||
|
\li \c {--dockerClangdExecutable <STRING>}
|
||||||
|
\li Path to the Clangd executable in the Docker container.
|
||||||
|
\li
|
||||||
|
\row
|
||||||
|
\li \c {--dockerMappedPaths <STRING>}
|
||||||
|
\li Semicolon-separated list of Docker mapped paths.
|
||||||
|
\li
|
||||||
|
\row
|
||||||
|
\li \c {--dockerRepo <STRING>}
|
||||||
|
\li Docker image repository.
|
||||||
|
\li
|
||||||
|
\row
|
||||||
|
\li \c {--dockerTag <STRING>}
|
||||||
|
\li Docker image tag.
|
||||||
|
\li
|
||||||
|
\row
|
||||||
|
\li \c {--freePorts <STRING>}
|
||||||
|
\li Free ports.
|
||||||
|
\li
|
||||||
|
\row
|
||||||
|
\li \c {--host <STRING>}
|
||||||
|
\li Host name or IP address of the device.
|
||||||
|
\li
|
||||||
|
\row
|
||||||
|
\li \c {--id <ID>}
|
||||||
|
\li Unique ID of the device.
|
||||||
|
\li \inlineimage ok.png
|
||||||
|
\row
|
||||||
|
\li \c {--keyFile <STRING>}
|
||||||
|
\li Path to the user's private key file.
|
||||||
|
\li
|
||||||
|
\row
|
||||||
|
\li \c {--name <NAME>}
|
||||||
|
\li Name of the device.
|
||||||
|
\li \inlineimage ok.png
|
||||||
|
\row
|
||||||
|
\li \c {--origin <INT>}
|
||||||
|
\li Whether the device was detected automatically:
|
||||||
|
\list
|
||||||
|
\li 1 for a manually added device
|
||||||
|
\li 2 for an automatically detected device
|
||||||
|
\endlist
|
||||||
|
\li
|
||||||
|
\row
|
||||||
|
\li \c {--osType <STRING>}
|
||||||
|
\li Operating system on the device:
|
||||||
|
\list
|
||||||
|
\li \c Android.Device.Type
|
||||||
|
\li \c BareMetalOsType
|
||||||
|
\li \c QdbLinuxOsType
|
||||||
|
\li \c DockerDeviceType
|
||||||
|
\li \c Ios.Device.Type
|
||||||
|
\li \c Ios.Simulator.Type
|
||||||
|
\li \c McuSupport.DeviceType
|
||||||
|
\li \c Desktop
|
||||||
|
\li \c WebAssemblyDeviceType
|
||||||
|
\li \c QnxOsType
|
||||||
|
\li \c GenericLinuxOsType
|
||||||
|
\endlist
|
||||||
|
\li
|
||||||
|
\row
|
||||||
|
\li \c {--password <STRING>}
|
||||||
|
\li Password for password authentication.
|
||||||
|
\li
|
||||||
|
\row
|
||||||
|
\li \c {--sshPort <INT>}
|
||||||
|
\li Port number for SSH connections.
|
||||||
|
\li
|
||||||
|
\row
|
||||||
|
\li \c {--timeout <INT>}
|
||||||
|
\li Timeout for reusing the SSH connection in seconds.
|
||||||
|
\li
|
||||||
|
\row
|
||||||
|
\li \c {--type <INT>}
|
||||||
|
\li Device type:
|
||||||
|
\list
|
||||||
|
\li 1 for a hardware device
|
||||||
|
\li 2 for an emulator, simulator, or virtual device
|
||||||
|
\endlist
|
||||||
|
\li \inlineimage ok.png
|
||||||
|
\row
|
||||||
|
\li \c {--uname <STRING>}
|
||||||
|
\li Username to access the device.
|
||||||
|
\li
|
||||||
|
\row
|
||||||
|
\li \c {<KEY> <TYPE:VALUE>}
|
||||||
|
\li Additional settings as key-value pairs.
|
||||||
|
\li
|
||||||
|
\endtable
|
||||||
|
|
||||||
|
For more information, see \l{Develop for Devices}{How To: Develop for Devices}.
|
||||||
|
|
||||||
|
\section2 Linux Device Example
|
||||||
|
|
||||||
|
To add a remote Linux device (hardware device) on Linux and use SSH keys to
|
||||||
|
authenticate to the device, enter:
|
||||||
|
|
||||||
|
\badcode
|
||||||
|
./sdktool addDev \
|
||||||
|
--id " LinuxDevice1" \
|
||||||
|
--name "My Remote Linux Device" \
|
||||||
|
--type 1 \
|
||||||
|
--authentication 2 \
|
||||||
|
--freePorts "10000-10100" \
|
||||||
|
--host "10.10.10.15" \
|
||||||
|
--keyFile "/usr/.ssh/qtc_id" \
|
||||||
|
--origin 1 \
|
||||||
|
--osType "GenericLinuxOsType" \
|
||||||
|
--sshPort 22 \
|
||||||
|
--timeout 10 \
|
||||||
|
--uname "root"
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
\section1 Adding Qt Versions
|
||||||
|
|
||||||
|
\section2 addQt
|
||||||
|
|
||||||
|
\badcode
|
||||||
|
sdktool addQt --id <ID> --name <NAME> --qmake <PATH> --type <TYPE> [OPTIONS]
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
\section2 addQt Options
|
||||||
|
|
||||||
|
The following table summarizes the available options.
|
||||||
|
|
||||||
|
\table
|
||||||
|
\header
|
||||||
|
\li Option
|
||||||
|
\li Description
|
||||||
|
\li Required
|
||||||
|
\row
|
||||||
|
\li \c {--abis <ABI,ABI>}
|
||||||
|
\li Comma-separated list of system architecture definitions.
|
||||||
|
\li
|
||||||
|
\row
|
||||||
|
\li \c {--id <ID>}
|
||||||
|
\li ID of the Qt installation. \QC automatically sets the ID when it
|
||||||
|
detects Qt versions installed on the computer.
|
||||||
|
\li \inlineimage ok.png
|
||||||
|
\row
|
||||||
|
\li \c {--name <NAME>}
|
||||||
|
\li Name of the Qt installation.
|
||||||
|
\li \inlineimage ok.png
|
||||||
|
\row
|
||||||
|
\li \c {--qmake <PATH>}
|
||||||
|
\li Path to the qmake executable in the Qt installation.
|
||||||
|
\li \inlineimage ok.png
|
||||||
|
\row
|
||||||
|
\li \c {--type <TYPE>}
|
||||||
|
\li The type of the Qt version:
|
||||||
|
\list
|
||||||
|
\li \c {Qt4ProjectManager.QtVersion.Android} for Android.
|
||||||
|
\li \c {Qt4ProjectManager.QtVersion.Desktop} for a desktop Qt.
|
||||||
|
\li \c {Qt4ProjectManager.QtVersion.Ios} for iOS.
|
||||||
|
\li \c {Qt4ProjectManager.QtVersion.QNX.QNX} for QNX.
|
||||||
|
\li \c {RemoteLinux.EmbeddedLinuxQt} for Embedded Linux.
|
||||||
|
\li \c {Qt4ProjectManager.QtVersion.WebAssembly} for
|
||||||
|
WebAssembly.
|
||||||
|
\endlist
|
||||||
|
The string returned by \c {QtVersion::type()}.
|
||||||
|
\li \inlineimage ok.png
|
||||||
|
\row
|
||||||
|
\li \c {<KEY> <TYPE:VALUE>}
|
||||||
|
\li Additional settings as key-value pairs.
|
||||||
|
\li
|
||||||
|
\endtable
|
||||||
|
|
||||||
|
For more information, see \l{Add Qt versions}.
|
||||||
|
|
||||||
|
\section2 Qt Version Example
|
||||||
|
|
||||||
|
To add a self-built Qt 6.8 version on Linux, enter:
|
||||||
|
|
||||||
|
\badcode
|
||||||
|
./sdktool addQt \
|
||||||
|
--id "company.product.qt" \
|
||||||
|
--name "Custom Qt" \
|
||||||
|
--qmake /home/code/build/qt-6.8/bin/qmake \
|
||||||
|
--type Qt4ProjectManager.QtVersion.Desktop \
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
\section1 Adding Kits
|
||||||
|
|
||||||
|
\section2 addKit
|
||||||
|
|
||||||
|
\badcode
|
||||||
|
sdktool addKit --id <ID> --name <NAME> --devicetype <TYPE> [OPTIONS]
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
\section2 addKit Options
|
||||||
|
|
||||||
|
The following table summarizes the available options.
|
||||||
|
|
||||||
|
\table
|
||||||
|
\header
|
||||||
|
\li Option
|
||||||
|
\li Description
|
||||||
|
\li Required
|
||||||
|
\row
|
||||||
|
\li \c {--builddevice <ID>}
|
||||||
|
\li The ID of the device to build applications on.
|
||||||
|
\li
|
||||||
|
\row
|
||||||
|
\li \c {--cmake <ID>}
|
||||||
|
\li The ID of the CMake executable to use for building the project.
|
||||||
|
\li
|
||||||
|
\row
|
||||||
|
\li \c {--cmake-config <KEY:TYPE=VALUE>}
|
||||||
|
\li Parameters for the CMake configuration of the kit. You can add
|
||||||
|
multiple entries of this type.
|
||||||
|
\li
|
||||||
|
\row
|
||||||
|
\li \c {--cmake-generator <GEN>:<EXTRA>:<TOOLSET>:<PLATFORM>}
|
||||||
|
\li The CMake Generator to use for producing project files.
|
||||||
|
\li
|
||||||
|
\row
|
||||||
|
\li \c {--debugger <PATH>}
|
||||||
|
\li Path to the debugger to use for the kit. Do not use this option
|
||||||
|
with \c {--debuggerid}.
|
||||||
|
\li
|
||||||
|
\row
|
||||||
|
\li \c {--debuggerengine <ENGINE>}
|
||||||
|
\li The type of the debugger set with \c {--debugger}. Do not use
|
||||||
|
this option with \c {--debuggerid}.
|
||||||
|
\li
|
||||||
|
\row
|
||||||
|
\li \c {--debuggerid <ID>}
|
||||||
|
\li One of the IDs used when adding debuggers with the
|
||||||
|
\c {addDebugger} operation. Do not use this option
|
||||||
|
with \c {--debugger} and \c {--debuggerengine}.
|
||||||
|
\li
|
||||||
|
\row
|
||||||
|
\li \c {--device <ID>}
|
||||||
|
\li The device to run applications on.
|
||||||
|
\li
|
||||||
|
\row
|
||||||
|
\li \c {--devicetype <TYPE>}
|
||||||
|
\li The type of the device to run applications on:
|
||||||
|
\list
|
||||||
|
\li \c {Android.Device.Type} for Android devices.
|
||||||
|
\li \c {Desktop} for code running on the local desktop.
|
||||||
|
\li \c {Ios.Device.Type} for iOS devices.
|
||||||
|
\li \c {Ios.Simulator.Type} for iOS simulators.
|
||||||
|
\li \c {GenericLinuxOsType} for embedded Linux devices.
|
||||||
|
\li \c {WebAssemblyDeviceType} for web browsers.
|
||||||
|
\endlist
|
||||||
|
The string returned by \c {IDevice::type()}.
|
||||||
|
\li \inlineimage ok.png
|
||||||
|
\row
|
||||||
|
\li \c {--env <VALUE>}
|
||||||
|
\li Environment variable values for the build environment. You can
|
||||||
|
add multiple entries of this type.
|
||||||
|
\li
|
||||||
|
\row
|
||||||
|
\li \c {--icon <PATH>}
|
||||||
|
\li Path to the image to use as an icon for the kit.
|
||||||
|
\li
|
||||||
|
\row
|
||||||
|
\li \c {--id <ID>}
|
||||||
|
\li ID of the kit. \QC automatically sets the ID when it
|
||||||
|
detects Qt versions installed on the computer.
|
||||||
|
\li \inlineimage ok.png
|
||||||
|
\row
|
||||||
|
\li \c {--<LANG>toolchain <ID>}
|
||||||
|
\li One of the IDs used when adding compilers with the \c {addTC}
|
||||||
|
operation. <LANG> is: \c C, \c Cxx, \c Nim, or something set
|
||||||
|
by a plugin.
|
||||||
|
\li
|
||||||
|
\row
|
||||||
|
\li \c {--mkspec <PATH>}
|
||||||
|
\li The \c mkspec configuration that qmake uses. Omit this option
|
||||||
|
to use the default \c mkspec of the set Qt version.
|
||||||
|
\li
|
||||||
|
\row
|
||||||
|
\li \c {--name <NAME>}
|
||||||
|
\li Name of the kit. You can use variables to generate the kit name
|
||||||
|
based on the kit elements you set with the other operations, such
|
||||||
|
as the Qt version.
|
||||||
|
\li \inlineimage ok.png
|
||||||
|
\row
|
||||||
|
\li \c {--qt <ID>}
|
||||||
|
\li One of the IDs used when adding Qt versions with the \c {addQt}
|
||||||
|
operation.
|
||||||
|
\li
|
||||||
|
\row
|
||||||
|
\li \c {<KEY> <TYPE:VALUE>}
|
||||||
|
\li Additional settings as key-value pairs.
|
||||||
|
\li
|
||||||
|
\endtable
|
||||||
|
|
||||||
|
For more information, see \l{Add kits}.
|
||||||
|
|
||||||
|
\section2 Kit Example
|
||||||
|
|
||||||
|
To add a kit that uses the GCC compiler and the self-built Qt to build
|
||||||
|
applications on Linux, enter:
|
||||||
|
|
||||||
|
\badcode
|
||||||
|
./sdktool addKit \
|
||||||
|
--id "company.product.kit" \
|
||||||
|
--name "Qt %{Qt:Version} (company, product)" \
|
||||||
|
--debuggerid "company.product.toolchain.gdb" \
|
||||||
|
--devicetype GenericLinuxOsType \
|
||||||
|
--sysroot /tmp/sysroot \
|
||||||
|
--Ctoolchain "ProjectExplorer.ToolChain.Gcc:company.product.toolchain.gcc" \
|
||||||
|
--Cxxtoolchain "ProjectExplorer.ToolChain.Gcc:company.product.toolchain.g++" \
|
||||||
|
--qt "company.product.qt" \
|
||||||
|
--mkspec "devices/linux-mipsel-broadcom-97425-g++" \
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
\section1 Adding, Getting, and Finding Keys
|
||||||
|
|
||||||
|
Enter the path to a file relative to the top-level settings directory and
|
||||||
|
without .xml extension, followed by one or more \c {<KEY> <TYPE>:<VALUE>}
|
||||||
|
key-value pairs.
|
||||||
|
|
||||||
|
\section1 Removing Configured Items
|
||||||
|
|
||||||
|
To remove a CMake tool, compiler, debugger, device, Qt version, or kit,
|
||||||
|
enter:
|
||||||
|
|
||||||
|
\badcode
|
||||||
|
rm<Item> --id <ID>
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
Where \c <ID> is the ID of the item.
|
||||||
|
|
||||||
|
\sa {Manage Kits}{How To: Manage Kits}, {Installation}, {Kits}
|
||||||
|
*/
|
||||||
@@ -7,9 +7,10 @@
|
|||||||
\nextpage creator-how-tos.html
|
\nextpage creator-how-tos.html
|
||||||
\ingroup creator-tutorials
|
\ingroup creator-tutorials
|
||||||
|
|
||||||
\title Creating a Qt Widget Based Application
|
\keyword {Creating a Qt Widget Based Application}
|
||||||
|
\title Tutorial: Qt Widgets application
|
||||||
|
|
||||||
\brief How to use the integrated \QD to create a Qt widget based application
|
\brief How to use the integrated \QD to create a Qt widget-based application
|
||||||
for the desktop.
|
for the desktop.
|
||||||
|
|
||||||
This tutorial describes how to use \QC to create a small Qt application,
|
This tutorial describes how to use \QC to create a small Qt application,
|
||||||
@@ -19,54 +20,54 @@
|
|||||||
|
|
||||||
\image qtcreator-textfinder-screenshot.png
|
\image qtcreator-textfinder-screenshot.png
|
||||||
|
|
||||||
\section1 Creating the Text Finder Project
|
\section1 Create the Text Finder project
|
||||||
|
|
||||||
\list 1
|
\list 1
|
||||||
|
|
||||||
\li Select \uicontrol File > \uicontrol {New Project} >
|
\li Go to \uicontrol File > \uicontrol {New Project} >
|
||||||
\uicontrol {Application (Qt)} > \uicontrol {Qt Widgets Application}
|
\uicontrol {Application (Qt)} > \uicontrol {Qt Widgets Application}.
|
||||||
> \uicontrol Choose.
|
|
||||||
|
|
||||||
\image qtcreator-new-qt-gui-application.png {New Project dialog}
|
\image qtcreator-new-project-qt-widgets.webp {New Project dialog}
|
||||||
|
|
||||||
The \uicontrol{Project Location} dialog opens.
|
\li Select \uicontrol Choose to open the \uicontrol {Project Location}
|
||||||
|
dialog.
|
||||||
|
|
||||||
\image qtcreator-intro-and-location-qt-gui.png {Project Location dialog}
|
\image qtcreator-new-project-location-qt-widgets.webp {Project Location dialog}
|
||||||
|
|
||||||
\li In the \uicontrol{Name} field, type \b {TextFinder}.
|
\li In \uicontrol{Name}, type \b {TextFinder}.
|
||||||
|
|
||||||
\li In the \uicontrol {Create in} field, enter the path for the project files.
|
\li In \uicontrol {Create in}, enter the path for the project files.
|
||||||
For example, \c {C:\Qt\examples}.
|
For example, \c {C:\Qt\examples}.
|
||||||
|
|
||||||
\li Select \uicontrol{Next} (on Windows and Linux) or
|
\li Select \uicontrol{Next} (on Windows and Linux) or
|
||||||
\uicontrol Continue (on \macos) to open the
|
\uicontrol Continue (on \macos) to open the
|
||||||
\uicontrol {Define Build System} dialog.
|
\uicontrol {Define Build System} dialog.
|
||||||
|
|
||||||
\image qtcreator-new-project-build-system-qt-gui.png {Define Build System dialog}
|
\image qtcreator-new-project-build-system.webp {Define Build System dialog}
|
||||||
|
|
||||||
\li In the \uicontrol {Build system} field, select \l {CMake}
|
\li In \uicontrol {Build system}, select \l {CMake}
|
||||||
{CMake} as the build system to use for building the project.
|
{CMake} as the build system to use for building the project.
|
||||||
|
|
||||||
\li Select \uicontrol Next or \uicontrol Continue to open the
|
\li Select \uicontrol Next or \uicontrol Continue to open the
|
||||||
\uicontrol{Class Information} dialog.
|
\uicontrol{Class Information} dialog.
|
||||||
|
|
||||||
\image qtcreator-class-info-qt-gui.png {Class Information dialog}
|
\image qtcreator-new-project-class-info.webp {Class Information dialog}
|
||||||
|
|
||||||
\li In the \uicontrol{Class name} field, type \b {TextFinder} as the class
|
\li In \uicontrol{Class name}, type \b {TextFinder} as the class
|
||||||
name.
|
name.
|
||||||
|
|
||||||
\li In the \uicontrol{Base class} list, select \b {QWidget} as the base
|
\li In \uicontrol{Base class}, select \b {QWidget} as the base
|
||||||
class type.
|
class type.
|
||||||
|
|
||||||
\note The \uicontrol{Header file}, \uicontrol{Source file} and \uicontrol{Form file}
|
\note \uicontrol{Header file}, \uicontrol{Source file} and \uicontrol{Form file}
|
||||||
fields are automatically updated to match the name of the class.
|
s are automatically updated to match the name of the class.
|
||||||
|
|
||||||
\li Select \uicontrol Next or \uicontrol Continue to open the
|
\li Select \uicontrol Next or \uicontrol Continue to open the
|
||||||
\uicontrol {Translation File} dialog.
|
\uicontrol {Translation File} dialog.
|
||||||
|
|
||||||
\image qtcreator-new-qt-gui-application-translationfile.png {Translation File dialog}
|
\image qtcreator-new-project-translation-file.webp {Translation File dialog}
|
||||||
|
|
||||||
\li In the \uicontrol Language field, you can select a language that you
|
\li In \uicontrol Language, you can select a language that you
|
||||||
plan to \l {Use Qt Linguist}{translate} the application to. This
|
plan to \l {Use Qt Linguist}{translate} the application to. This
|
||||||
sets up localization support for the application. You can add other
|
sets up localization support for the application. You can add other
|
||||||
languages later by editing the project file.
|
languages later by editing the project file.
|
||||||
@@ -74,7 +75,7 @@
|
|||||||
\li Select \uicontrol Next or \uicontrol Continue to open the
|
\li Select \uicontrol Next or \uicontrol Continue to open the
|
||||||
\uicontrol {Kit Selection} dialog.
|
\uicontrol {Kit Selection} dialog.
|
||||||
|
|
||||||
\image qtcreator-new-project-qt-versions-qt-gui.png {Kit Selection dialog}
|
\image qtcreator-new-project-kit-selection.webp {Kit Selection dialog}
|
||||||
|
|
||||||
\li Select build and run \l{Kits}{kits} for your
|
\li Select build and run \l{Kits}{kits} for your
|
||||||
project.
|
project.
|
||||||
@@ -82,7 +83,7 @@
|
|||||||
\li Select \uicontrol Next or \uicontrol Continue to open the
|
\li Select \uicontrol Next or \uicontrol Continue to open the
|
||||||
\uicontrol {Project Management} dialog.
|
\uicontrol {Project Management} dialog.
|
||||||
|
|
||||||
\image qtcreator-new-project-summary-qt-gui.png {Project Management dialog}
|
\image qtcreator-new-project-summary.webp {Project Management dialog}
|
||||||
|
|
||||||
\li Review the project settings, and select \uicontrol{Finish} (on Windows and
|
\li Review the project settings, and select \uicontrol{Finish} (on Windows and
|
||||||
Linux) or \uicontrol Done (on \macos) to create the project.
|
Linux) or \uicontrol Done (on \macos) to create the project.
|
||||||
@@ -111,18 +112,18 @@
|
|||||||
If you selected CMake as the build system, \QC created a CMakeLists.txt
|
If you selected CMake as the build system, \QC created a CMakeLists.txt
|
||||||
project file for you.
|
project file for you.
|
||||||
|
|
||||||
\section1 Filling in the Missing Pieces
|
\section1 Fill in the missing pieces
|
||||||
|
|
||||||
Begin by designing the user interface and then move on to filling
|
Begin by designing the user interface and then move on to filling
|
||||||
in the missing code. Finally, add the find functionality.
|
in the missing code. Finally, add the find functionality.
|
||||||
|
|
||||||
\section2 Designing the User Interface
|
\section2 Design the user interface
|
||||||
|
|
||||||
\image qtcreator-textfinder-ui.png {Text Finder UI}
|
\image qtcreator-textfinder-ui.png {Text Finder UI}
|
||||||
|
|
||||||
\list 1
|
\list 1
|
||||||
|
|
||||||
\li In the \uicontrol{Editor} mode, double-click the textfinder.ui file in the
|
\li In the \uicontrol {Edit} mode, double-click the textfinder.ui file in the
|
||||||
\uicontrol{Projects} view to launch the integrated \QD.
|
\uicontrol{Projects} view to launch the integrated \QD.
|
||||||
|
|
||||||
\li Drag the following widgets to the form:
|
\li Drag the following widgets to the form:
|
||||||
@@ -138,10 +139,10 @@
|
|||||||
\image qtcreator-textfinder-ui-widgets.png {Adding widgets to Text Finder UI}
|
\image qtcreator-textfinder-ui-widgets.png {Adding widgets to Text Finder UI}
|
||||||
|
|
||||||
\note To easily locate the widgets, use the search box at the top of the
|
\note To easily locate the widgets, use the search box at the top of the
|
||||||
\uicontrol Sidebar. For example, to find the \uicontrol Label widget, start typing
|
\uicontrol {Widget Box}. For example, to find the \uicontrol Label widget,
|
||||||
the word \b label.
|
start typing the word \b label.
|
||||||
|
|
||||||
\image qtcreator-textfinder-filter.png {Filter field}
|
\image qtcreator-textfinder-filter.png {Filter}
|
||||||
|
|
||||||
\li Double-click the \uicontrol{Label} widget and enter the text
|
\li Double-click the \uicontrol{Label} widget and enter the text
|
||||||
\b{Keyword}.
|
\b{Keyword}.
|
||||||
@@ -199,7 +200,7 @@
|
|||||||
For more information about designing forms with \QD, see the
|
For more information about designing forms with \QD, see the
|
||||||
\l{\QD Manual}.
|
\l{\QD Manual}.
|
||||||
|
|
||||||
\section2 Completing the Header File
|
\section2 Complete the header file
|
||||||
|
|
||||||
The textfinder.h file already has the necessary #includes, a constructor,
|
The textfinder.h file already has the necessary #includes, a constructor,
|
||||||
a destructor, and the \c{Ui} object. You need to add a private function,
|
a destructor, and the \c{Ui} object. You need to add a private function,
|
||||||
@@ -218,7 +219,7 @@
|
|||||||
|
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
\section2 Completing the Source File
|
\section2 Complete the source file
|
||||||
|
|
||||||
Now that the header file is complete, move on to the source file,
|
Now that the header file is complete, move on to the source file,
|
||||||
textfinder.cpp.
|
textfinder.cpp.
|
||||||
@@ -258,7 +259,7 @@
|
|||||||
QMetaObject::connectSlotsByName(TextFinder);
|
QMetaObject::connectSlotsByName(TextFinder);
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
\section2 Creating a Resource File
|
\section2 Create a resource file
|
||||||
|
|
||||||
You need a resource file (.qrc) within which you embed the input
|
You need a resource file (.qrc) within which you embed the input
|
||||||
text file. The input file can be any .txt file with a paragraph of text.
|
text file. The input file can be any .txt file with a paragraph of text.
|
||||||
@@ -269,32 +270,32 @@
|
|||||||
|
|
||||||
\list 1
|
\list 1
|
||||||
|
|
||||||
\li Select \uicontrol File > \uicontrol {New File} >
|
\li Go to \uicontrol File > \uicontrol {New File} >
|
||||||
\uicontrol Qt > \uicontrol {Qt Resource File} > \uicontrol Choose.
|
\uicontrol Qt > \uicontrol {Qt Resource File} > \uicontrol Choose.
|
||||||
|
|
||||||
\image qtcreator-add-resource-wizard.png {New File dialog}
|
\image qtcreator-new-file-qrc.webp {New File dialog}
|
||||||
|
|
||||||
The \uicontrol {Choose the Location} dialog opens.
|
The \uicontrol {Choose the Location} dialog opens.
|
||||||
|
|
||||||
\image qtcreator-add-resource-wizard2.png {Choose the Location dialog}
|
\image qtcreator-new-file-qrc1.webp {Choose the Location dialog}
|
||||||
|
|
||||||
\li In the \uicontrol{Name} field, enter \b{textfinder}.
|
\li In \uicontrol{Name}, enter \b{textfinder}.
|
||||||
|
|
||||||
\li In the \uicontrol{Path} field, enter the path to the project,
|
\li In \uicontrol{Path}, enter the path to the project,
|
||||||
and select \uicontrol Next or \uicontrol Continue.
|
and select \uicontrol Next or \uicontrol Continue.
|
||||||
|
|
||||||
The \uicontrol{Project Management} dialog opens.
|
The \uicontrol{Project Management} dialog opens.
|
||||||
|
|
||||||
\image qtcreator-add-resource-wizard3.png {Project Management dialog}
|
\image qtcreator-new-file-qrc2.webp {Project Management dialog}
|
||||||
|
|
||||||
|
|
||||||
\li In the \uicontrol{Add to project} field, select \b{TextFinder}
|
\li In \uicontrol{Add to project}, select \b{TextFinder}
|
||||||
and select \uicontrol{Finish} or \uicontrol Done to open the file
|
and select \uicontrol{Finish} or \uicontrol Done to open the file
|
||||||
in the code editor.
|
in the code editor.
|
||||||
|
|
||||||
\li Select \uicontrol Add > \uicontrol {Add Prefix}.
|
\li Select \uicontrol Add > \uicontrol {Add Prefix}.
|
||||||
|
|
||||||
\li In the \uicontrol{Prefix} field, replace the default prefix with a slash
|
\li In \uicontrol{Prefix}, replace the default prefix with a slash
|
||||||
(/).
|
(/).
|
||||||
|
|
||||||
\li Select \uicontrol Add > \uicontrol {Add Files}, to locate and add
|
\li Select \uicontrol Add > \uicontrol {Add Files}, to locate and add
|
||||||
@@ -304,7 +305,7 @@
|
|||||||
|
|
||||||
\endlist
|
\endlist
|
||||||
|
|
||||||
\section1 Adding Resources to Project File
|
\section1 Add resources to the project file
|
||||||
|
|
||||||
For the text file to appear when you run the application, you must specify
|
For the text file to appear when you run the application, you must specify
|
||||||
the resource file as a source file in the \e CMakeLists.txt file that the
|
the resource file as a source file in the \e CMakeLists.txt file that the
|
||||||
@@ -314,10 +315,9 @@
|
|||||||
\skipto set(PROJECT_SOURCES
|
\skipto set(PROJECT_SOURCES
|
||||||
\printuntil )
|
\printuntil )
|
||||||
|
|
||||||
\section1 Compiling and Running Your Application
|
\section1 Build and run your application
|
||||||
|
|
||||||
Now that you have all the necessary files, select the
|
Now that you have all the necessary files, select
|
||||||
\inlineimage icons/run_small.png
|
\inlineimage icons/run_small.png to build and run your application.
|
||||||
button to compile and run your application.
|
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -119,5 +119,5 @@
|
|||||||
To import device profiles from .qdp files, select \uicontrol Open. To save
|
To import device profiles from .qdp files, select \uicontrol Open. To save
|
||||||
them as .qdp files, select \uicontrol Save.
|
them as .qdp files, select \uicontrol Save.
|
||||||
|
|
||||||
\sa {Creating a Qt Widget Based Application}, {Adding \QD Plugins}
|
\sa {Tutorial: Qt Widgets application}, {Adding \QD Plugins}
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -69,5 +69,5 @@
|
|||||||
\MinGW or installing a Qt version that was built with Microsoft Visual Studio,
|
\MinGW or installing a Qt version that was built with Microsoft Visual Studio,
|
||||||
depending on which configuration you want to use for your applications.
|
depending on which configuration you want to use for your applications.
|
||||||
|
|
||||||
\sa {Creating a Qt Widget Based Application}, {\QD}
|
\sa {Tutorial: Qt Widgets application}, {\QD}
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -632,6 +632,9 @@ class DumperBase():
|
|||||||
self.register_struct('@QList<@QStandardItemData>', p5=1, p6=3)
|
self.register_struct('@QList<@QStandardItemData>', p5=1, p6=3)
|
||||||
self.register_struct('@QList<@QRect>', p5=1, p6=3)
|
self.register_struct('@QList<@QRect>', p5=1, p6=3)
|
||||||
|
|
||||||
|
typeid_string_list = self.register_struct('@QList<@QString>', p5=1, p6=3)
|
||||||
|
self.register_typedef('@QStringList', typeid_string_list)
|
||||||
|
|
||||||
typeid_var_list = self.register_struct('@QList<@QVariant>', p5=1, p6=3)
|
typeid_var_list = self.register_struct('@QList<@QVariant>', p5=1, p6=3)
|
||||||
self.register_typedef('@QVariantList', typeid_var_list)
|
self.register_typedef('@QVariantList', typeid_var_list)
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
cmake_minimum_required(VERSION 3.16)
|
cmake_minimum_required(VERSION 3.16)
|
||||||
|
|
||||||
# Remove when sharing with others.
|
# Remove when sharing with others.
|
||||||
@if %{JS: Util.isDirectory('%{QtCreatorBuild}/Qt Creator.app/Contents/Resources')}
|
@if %{JS: Util.isDirectory('%{QtCreatorBuild}/Qt Creator.app/Contents/Resources/lib/cmake/QtCreator')}
|
||||||
list(APPEND CMAKE_PREFIX_PATH "%{QtCreatorBuild}/Qt Creator.app/Contents/Resources")
|
list(APPEND CMAKE_PREFIX_PATH "%{QtCreatorBuild}/Qt Creator.app/Contents/Resources")
|
||||||
@else
|
@else
|
||||||
@if %{JS: Util.isDirectory('%{QtCreatorBuild}/Contents/Resources')}
|
@if %{JS: Util.isDirectory('%{QtCreatorBuild}/Contents/Resources/lib/cmake/QtCreator')}
|
||||||
list(APPEND CMAKE_PREFIX_PATH "%{QtCreatorBuild}/Contents/Resources")
|
list(APPEND CMAKE_PREFIX_PATH "%{QtCreatorBuild}/Contents/Resources")
|
||||||
@else
|
@else
|
||||||
list(APPEND CMAKE_PREFIX_PATH "%{QtCreatorBuild}")
|
list(APPEND CMAKE_PREFIX_PATH "%{QtCreatorBuild}")
|
||||||
|
|||||||
@@ -47079,7 +47079,7 @@ Weitere Informationen finden Sie auf der Dokumentationsseite "Checking Code
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>JavaScript can break the visual tooling in Qt Design Studio.</source>
|
<source>JavaScript can break the visual tooling in Qt Design Studio.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>JavaScript kann das visuelle Tooling in Qt Design Studio stören.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Duplicate import (%1).</source>
|
<source>Duplicate import (%1).</source>
|
||||||
@@ -47464,23 +47464,23 @@ Sie können eine Annotation "// @uri My.Module.Uri" hinzufügen, um de
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Turn on</source>
|
<source>Turn on</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Einschalten</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Allow versions below Qt %1</source>
|
<source>Allow versions below Qt %1</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Versionen niedriger als Qt %1 erlauben</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Use advanced features (renaming, find usages, and so on) (experimental)</source>
|
<source>Use advanced features (renaming, find usages, and so on) (experimental)</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Erweiterte Funktionen verwenden (umbenennen, Verweise finden und weiteres) (experimentell)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Use from latest Qt version</source>
|
<source>Use from latest Qt version</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Neueste Qt-Version verwenden</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Create .qmlls.ini files for new projects</source>
|
<source>Create .qmlls.ini files for new projects</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>.qmlls.ini-Dateien für neue Projekte erstellen</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>QML Language Server</source>
|
<source>QML Language Server</source>
|
||||||
@@ -48579,7 +48579,7 @@ Speichern fehlgeschlagen.</translation>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Override device QML viewer:</source>
|
<source>Override device QML viewer:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Statt QML-Viewer auf Gerät verwenden:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>System Environment</source>
|
<source>System Environment</source>
|
||||||
@@ -48592,31 +48592,31 @@ Speichern fehlgeschlagen.</translation>
|
|||||||
<message>
|
<message>
|
||||||
<source>QML Utility</source>
|
<source>QML Utility</source>
|
||||||
<comment>QMLRunConfiguration display name.</comment>
|
<comment>QMLRunConfiguration display name.</comment>
|
||||||
<translation type="unfinished"></translation>
|
<translation>QML-Werkzeug</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>No QML utility found.</source>
|
<source>No QML utility found.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Kein QML-Werkzeug gefunden.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>No QML utility specified for target device.</source>
|
<source>No QML utility specified for target device.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Für das Zielgerät wurde kein QML-Werkzeug angegeben.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Qt Version:</source>
|
<source>Qt Version:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Qt-Version:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Qt 6</source>
|
<source>Qt 6</source>
|
||||||
<translation type="unfinished">Qt 6</translation>
|
<translation>Qt 6</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Qt 5</source>
|
<source>Qt 5</source>
|
||||||
<translation type="unfinished">Qt 5</translation>
|
<translation>Qt 5</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>QML Runtime</source>
|
<source>QML Runtime</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>QML-Runtime</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>No script file to execute.</source>
|
<source>No script file to execute.</source>
|
||||||
@@ -48632,7 +48632,7 @@ Speichern fehlgeschlagen.</translation>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Update QmlProject File</source>
|
<source>Update QmlProject File</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>QmlProject-Datei aktualisieren</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Warning while loading project file %1.</source>
|
<source>Warning while loading project file %1.</source>
|
||||||
@@ -48640,164 +48640,169 @@ Speichern fehlgeschlagen.</translation>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>No Qt Design Studio installation found</source>
|
<source>No Qt Design Studio installation found</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Es wurde keine Installation von Qt Design Studio gefunden</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Would you like to install it now?</source>
|
<source>Would you like to install it now?</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Möchten Sie es jetzt installieren?</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Install</source>
|
<source>Install</source>
|
||||||
<translation type="unfinished">Installieren</translation>
|
<translation>Installieren</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Unknown</source>
|
<source>Unknown</source>
|
||||||
<translation type="unfinished">Unbekannt</translation>
|
<translation>Unbekannt</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>QML PROJECT FILE INFO</source>
|
<source>QML PROJECT FILE INFO</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>QML PROJECT FILE INFO</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Qt Version - </source>
|
<source>Qt Version - </source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Qt-Version - </translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Qt Design Studio Version - </source>
|
<source>Qt Design Studio Version - </source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Qt Design Studio-Version - </translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>No QML project file found - Would you like to create one?</source>
|
<source>No QML project file found - Would you like to create one?</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Keine QML-Projektdatei gefunden - möchten Sie eine erstellen?</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Generate</source>
|
<source>Generate</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Erstellen</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Qt Design Studio</source>
|
<source>Qt Design Studio</source>
|
||||||
<translation type="unfinished">Qt Design Studio</translation>
|
<translation>Qt Design Studio</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Open with Qt Design Studio</source>
|
<source>Open with Qt Design Studio</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Mit Qt Design Studio öffnen</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Open</source>
|
<source>Open</source>
|
||||||
<translation type="unfinished">Öffnen</translation>
|
<translation>Öffnen</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Open with Qt Creator - Text Mode</source>
|
<source>Open with Qt Creator - Text Mode</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Mit Qt Creator im Textmodus öffnen</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Remember my choice</source>
|
<source>Remember my choice</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Meine Auswahl speichern</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Export Project</source>
|
<source>Export Project</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Projekt exportieren</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Enable Automatic CMake Generation</source>
|
<source>Enable Automatic CMake Generation</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Automatische CMake-Erstellung aktivieren</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Use MultiLanguage in 2D view</source>
|
<source>Use MultiLanguage in 2D view</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>MultiLanguage in der 2D-Ansicht verwenden</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Reads translations from MultiLanguage plugin.</source>
|
<source>Reads translations from MultiLanguage plugin.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Liest Übersetzungen aus dem MultiLanguage-Plugin.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Failed to start Qt Design Studio.</source>
|
<source>Failed to start Qt Design Studio.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Qt Design Studio konnte nicht gestartet werden.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>No project file (*.qmlproject) found for Qt Design Studio.
|
<source>No project file (*.qmlproject) found for Qt Design Studio.
|
||||||
Qt Design Studio requires a .qmlproject based project to open the .ui.qml file.</source>
|
Qt Design Studio requires a .qmlproject based project to open the .ui.qml file.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Es wurde keine Projektdatei (*.qmlproject) für Qt Design Studio gefunden.
|
||||||
|
Qt Design Studio benötigt zum Öffnen der .ui.qml-Datei ein .qmlproject-basiertes Projekt.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Set as Main .qml File</source>
|
<source>Set as Main .qml File</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Als .qml-Hauptdatei setzen</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Set as Main .ui.qml File</source>
|
<source>Set as Main .ui.qml File</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Als .ui.qml-Hauptdatei setzen</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Project File Generated</source>
|
<source>Project File Generated</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Projektdatei erstellt</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>File created:
|
<source>File created:
|
||||||
|
|
||||||
%1</source>
|
%1</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Datei erstellt:
|
||||||
|
|
||||||
|
%1</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Select File Location</source>
|
<source>Select File Location</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Dateipfad auswählen</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Qt Design Studio Project Files (*.qmlproject)</source>
|
<source>Qt Design Studio Project Files (*.qmlproject)</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Qt Design Studio Projektdateien (*.qmlproject)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Invalid Directory</source>
|
<source>Invalid Directory</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Ungültiges Verzeichnis</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Project file must be placed in a parent directory of the QML files.</source>
|
<source>Project file must be placed in a parent directory of the QML files.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Die Projektdatei muss in einem den QML-Dateien übergeordneten Verzeichnis erstellt werden.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Problem</source>
|
<source>Problem</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Problem</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Selected directory is far away from the QML file. This can cause unexpected results.
|
<source>Selected directory is far away from the QML file. This can cause unexpected results.
|
||||||
|
|
||||||
Are you sure?</source>
|
Are you sure?</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Das ausgewählte Verzeichnis liegt weit entfernt von der QML-Datei. Dies kann zu unerwarteten Ergebnissen führen.
|
||||||
|
|
||||||
|
Sind Sie sicher?</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Cannot find a valid build system.</source>
|
<source>Cannot find a valid build system.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Es kann kein gültiges Build-System gefunden werden.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Cannot create a valid build directory.</source>
|
<source>Cannot create a valid build directory.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Es kann kein gültiges Build-Verzeichnis erstellt werden.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Command:</source>
|
<source>Command:</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Kommando:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Arguments:</source>
|
<source>Arguments:</source>
|
||||||
<translation type="unfinished">Argumente:</translation>
|
<translation>Argumente:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Build directory:</source>
|
<source>Build directory:</source>
|
||||||
<translation type="unfinished">Build-Verzeichnis:</translation>
|
<translation>Build-Verzeichnis:</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>The Selected Kit Is Not Supported</source>
|
<source>The Selected Kit Is Not Supported</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Das gewählte Kit wird nicht unterstützt</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>You cannot use the selected kit to preview Qt for MCUs applications.</source>
|
<source>You cannot use the selected kit to preview Qt for MCUs applications.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Das gewählte Kit kann nicht zur Vorschau von Qt for MCUs-Anwendungen verwendet werden.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Cannot find a valid Qt for MCUs kit.</source>
|
<source>Cannot find a valid Qt for MCUs kit.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Es kann kein gültiges Kit für Qt for MCUs gefunden werden.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Qt for MCUs Deploy Step</source>
|
<source>Qt for MCUs Deploy Step</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Qt for MCUs Deployment-Schritt</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
@@ -50098,13 +50103,15 @@ Zusätzlich wird die Verbindung zum Gerät getestet.</translation>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Use SSH port forwarding for debugging</source>
|
<source>Use SSH port forwarding for debugging</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>SSH-Portweiterleitung zum Debuggen verwenden</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Enable debugging on remote targes which cannot expose gdbserver ports.
|
<source>Enable debugging on remote targes which cannot expose gdbserver ports.
|
||||||
The ssh tunneling is used to map the remote gdbserver port to localhost.
|
The ssh tunneling is used to map the remote gdbserver port to localhost.
|
||||||
The local and remote ports are determined automatically.</source>
|
The local and remote ports are determined automatically.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Mache Debuggen auf entfernten Zielen möglich, die gdbserver-Ports nicht direkt bereitstellen können.
|
||||||
|
Es wird SSH-Tunneling verwendet, um die entfernten gdbserver-Ports auf localhost abzubilden.
|
||||||
|
Die lokalen und entfernten Ports werden automatisch bestimmt.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>&Username:</source>
|
<source>&Username:</source>
|
||||||
@@ -50207,7 +50214,7 @@ Der Steuerprozess konnte nicht gestartet werden.</translation>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Device "%1" is disconnected.</source>
|
<source>Device "%1" is disconnected.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Gerät "%1" ist nicht verbunden.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Remote Linux</source>
|
<source>Remote Linux</source>
|
||||||
@@ -50232,17 +50239,19 @@ Der Steuerprozess konnte nicht gestartet werden.</translation>
|
|||||||
<message>
|
<message>
|
||||||
<source>Created directory: "%1".
|
<source>Created directory: "%1".
|
||||||
</source>
|
</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Verzeichnis wurde erstellt: "%1".
|
||||||
|
</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Copied %1/%2: "%3" -> "%4".
|
<source>Copied %1/%2: "%3" -> "%4".
|
||||||
</source>
|
</source>
|
||||||
<extracomment>%1/%2 = progress in the form 4/15, %3 and %4 = source and target file paths</extracomment>
|
<extracomment>%1/%2 = progress in the form 4/15, %3 and %4 = source and target file paths</extracomment>
|
||||||
<translation type="unfinished"></translation>
|
<translation>%1/%2 kopiert: "%3 -> "%4".
|
||||||
|
</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Failed to deploy files.</source>
|
<source>Failed to deploy files.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Deployment der Dateien ist fehlgeschlagen.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Device is considered unconnected. Re-run device test to reset state.</source>
|
<source>Device is considered unconnected. Re-run device test to reset state.</source>
|
||||||
@@ -50384,15 +50393,15 @@ Wenn Sie noch keinen privaten Schlüssel besitzen, können Sie hier auch einen e
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>%1 failed to start: %2</source>
|
<source>%1 failed to start: %2</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>%1 konnte nicht gestartet werden: %2</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>%1 crashed.</source>
|
<source>%1 crashed.</source>
|
||||||
<translation type="unfinished">%1 ist abgestürzt.</translation>
|
<translation>%1 ist abgestürzt.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>%1 failed with exit code %2.</source>
|
<source>%1 failed with exit code %2.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>%1 ist mit Rückgabewert %2 fehlgeschlagen.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Deploy files</source>
|
<source>Deploy files</source>
|
||||||
@@ -50770,7 +50779,7 @@ Wenn Sie noch keinen privaten Schlüssel besitzen, können Sie hier auch einen e
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Cropping</source>
|
<source>Cropping</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Zuschneiden</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Crop and Trim...</source>
|
<source>Crop and Trim...</source>
|
||||||
@@ -54535,15 +54544,15 @@ Bestimmt das Verhalten bezüglich der Einrückung von Fortsetzungszeilen.
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Open Type Hierarchy</source>
|
<source>Open Type Hierarchy</source>
|
||||||
<translation type="unfinished">Klassenhierarchie öffnen</translation>
|
<translation>Klassenhierarchie öffnen</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Meta+Shift+T</source>
|
<source>Meta+Shift+T</source>
|
||||||
<translation type="unfinished">Meta+Shift+T</translation>
|
<translation>Meta+Shift+T</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Ctrl+Shift+T</source>
|
<source>Ctrl+Shift+T</source>
|
||||||
<translation type="unfinished">Ctrl+Shift+T</translation>
|
<translation>Ctrl+Shift+T</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Move the View a Page Up and Keep the Cursor Position</source>
|
<source>Move the View a Page Up and Keep the Cursor Position</source>
|
||||||
@@ -54731,23 +54740,23 @@ Bestimmt das Verhalten bezüglich der Einrückung von Fortsetzungszeilen.
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Sort Lines</source>
|
<source>Sort Lines</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Zeilen sortieren</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Go to Previous Word (Camel Case)</source>
|
<source>Go to Previous Word (Camel Case)</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Zum vorhergehenden Wort springen (Camel Case)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Go to Next Word (Camel Case)</source>
|
<source>Go to Next Word (Camel Case)</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Zum nächsten Wort springen (Camel Case)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Go to Previous Word (Camel Case) with Selection</source>
|
<source>Go to Previous Word (Camel Case) with Selection</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Vorhergehendes Wort markieren (Camel Case)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Go to Next Word (Camel Case) with Selection</source>
|
<source>Go to Next Word (Camel Case) with Selection</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Nächstes Wort markieren (Camel Case)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Meta+Shift+S</source>
|
<source>Meta+Shift+S</source>
|
||||||
@@ -55987,15 +55996,15 @@ Außer Leerzeichen innerhalb von Kommentaren und Zeichenketten.</translation>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Type Hierarchy</source>
|
<source>Type Hierarchy</source>
|
||||||
<translation type="unfinished">Klassenhierarchie</translation>
|
<translation>Typenhierarchie</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>No type hierarchy available</source>
|
<source>No type hierarchy available</source>
|
||||||
<translation type="unfinished">Keine Klassenhierarchie verfügbar</translation>
|
<translation>Keine Typenhierarchie verfügbar</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Reloads the type hierarchy for the symbol under the cursor.</source>
|
<source>Reloads the type hierarchy for the symbol under the cursor.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Lädt die Typenhierarchie für das Symbol unter der Einfügemarke neu.</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
@@ -56753,7 +56762,7 @@ Die Trace-Daten sind verloren.</translation>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>watch is not implemented.</source>
|
<source>watch is not implemented.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>"watch" ist nicht implementiert.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Refusing to remove the standard directory "%1".</source>
|
<source>Refusing to remove the standard directory "%1".</source>
|
||||||
@@ -57224,11 +57233,11 @@ Die Trace-Daten sind verloren.</translation>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Failed to open output file.</source>
|
<source>Failed to open output file.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Die Ausgabedatei konnte nicht geöffnet werden.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Failed to write output file.</source>
|
<source>Failed to write output file.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Die Ausgabedatei konnte nicht geschrieben werden.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Command failed.</source>
|
<source>Command failed.</source>
|
||||||
@@ -57259,7 +57268,7 @@ in "%2" aus.
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Default</source>
|
<source>Default</source>
|
||||||
<translation type="unfinished">Vorgabe</translation>
|
<translation>Vorgabe</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>Show %1 Column</source>
|
<source>Show %1 Column</source>
|
||||||
@@ -57336,7 +57345,14 @@ To prepend to a variable, use VARIABLE=+VALUE.
|
|||||||
Existing variables can be referenced in a VALUE with ${OTHER}.
|
Existing variables can be referenced in a VALUE with ${OTHER}.
|
||||||
To clear a variable, put its name on a line with nothing else on it.
|
To clear a variable, put its name on a line with nothing else on it.
|
||||||
Lines starting with "##" will be treated as comments.</source>
|
Lines starting with "##" will be treated as comments.</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Geben Sie eine Umgebungsvariable pro Zeile ein.
|
||||||
|
Um eine Variable zu setzen oder zu ändern, verwenden Sie VARIABLE=WERT.
|
||||||
|
Um eine Variable zu deaktivieren, stellen Sie der Zeile "#" voran.
|
||||||
|
Um einen Wert an eine Variable anzufügen, verwenden Sie VARIABLE+=WERT.
|
||||||
|
Um einen Wert einer Variable voranzustellen, verwenden Sie VARIABLE=+WERT.
|
||||||
|
Existierende Variablen können in einem WERT mit ${ANDERE} verwendet werden.
|
||||||
|
Um eine Variable zu leeren, schreiben Sie nichts als ihren Namen in eine Zeile.
|
||||||
|
Zeilen, die mit "##" beginnen, werden als Kommentare behandelt.</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>&OK</source>
|
<source>&OK</source>
|
||||||
@@ -57454,7 +57470,7 @@ Lines starting with "##" will be treated as comments.</source>
|
|||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<source>No Lua interface set</source>
|
<source>No Lua interface set</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation>Keine Lua-Schnittstelle eingestellt</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
|
|||||||
@@ -239,6 +239,12 @@ void MultiTextCursor::removeSelectedText()
|
|||||||
mergeCursors();
|
mergeCursors();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MultiTextCursor::clearSelection()
|
||||||
|
{
|
||||||
|
for (auto cursor = m_cursorList.begin(); cursor != m_cursorList.end(); ++cursor)
|
||||||
|
cursor->clearSelection();
|
||||||
|
}
|
||||||
|
|
||||||
static void insertAndSelect(QTextCursor &cursor, const QString &text, bool selectNewText)
|
static void insertAndSelect(QTextCursor &cursor, const QString &text, bool selectNewText)
|
||||||
{
|
{
|
||||||
if (selectNewText) {
|
if (selectNewText) {
|
||||||
@@ -333,7 +339,8 @@ static QTextLine currentTextLine(const QTextCursor &cursor)
|
|||||||
bool MultiTextCursor::multiCursorEvent(
|
bool MultiTextCursor::multiCursorEvent(
|
||||||
QKeyEvent *e, QKeySequence::StandardKey matchKey, Qt::KeyboardModifiers filterModifiers)
|
QKeyEvent *e, QKeySequence::StandardKey matchKey, Qt::KeyboardModifiers filterModifiers)
|
||||||
{
|
{
|
||||||
uint searchkey = (e->modifiers() | e->key()) & ~(filterModifiers | Qt::AltModifier);
|
filterModifiers |= (Utils::HostOsInfo::isMacHost() ? Qt::KeypadModifier : Qt::AltModifier);
|
||||||
|
uint searchkey = (e->modifiers() | e->key()) & ~filterModifiers;
|
||||||
|
|
||||||
const QList<QKeySequence> bindings = QKeySequence::keyBindings(matchKey);
|
const QList<QKeySequence> bindings = QKeySequence::keyBindings(matchKey);
|
||||||
return bindings.contains(QKeySequence(searchkey));
|
return bindings.contains(QKeySequence(searchkey));
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ public:
|
|||||||
QString selectedText() const;
|
QString selectedText() const;
|
||||||
/// removes the selected text of all cursors that have a selection from the document
|
/// removes the selected text of all cursors that have a selection from the document
|
||||||
void removeSelectedText();
|
void removeSelectedText();
|
||||||
|
void clearSelection();
|
||||||
|
|
||||||
/// inserts \param text into all cursors, potentially removing correctly selected text
|
/// inserts \param text into all cursors, potentially removing correctly selected text
|
||||||
void insertText(const QString &text, bool selectNewText = false);
|
void insertText(const QString &text, bool selectNewText = false);
|
||||||
|
|||||||
@@ -263,7 +263,7 @@ void handleInactiveRegions(LanguageClient::Client *client, const JsonRpcMessage
|
|||||||
const QList<Range> inactiveRegions = params->inactiveRegions();
|
const QList<Range> inactiveRegions = params->inactiveRegions();
|
||||||
QList<BlockRange> ifdefedOutBlocks;
|
QList<BlockRange> ifdefedOutBlocks;
|
||||||
for (const Range &r : inactiveRegions) {
|
for (const Range &r : inactiveRegions) {
|
||||||
const int startPos = r.start().toPositionInDocument(doc->document());
|
const int startPos = Position(r.start().line(), 0).toPositionInDocument(doc->document());
|
||||||
const int endPos = r.end().toPositionInDocument(doc->document()) + 1;
|
const int endPos = r.end().toPositionInDocument(doc->document()) + 1;
|
||||||
ifdefedOutBlocks.emplaceBack(startPos, endPos);
|
ifdefedOutBlocks.emplaceBack(startPos, endPos);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -177,10 +177,11 @@ void ClangToolsPlugin::registerAnalyzeActions()
|
|||||||
widget->toolBar()->addWidget(button);
|
widget->toolBar()->addWidget(button);
|
||||||
const auto toolsMenu = new QMenu(widget);
|
const auto toolsMenu = new QMenu(widget);
|
||||||
button->setMenu(toolsMenu);
|
button->setMenu(toolsMenu);
|
||||||
for (const auto &toolInfo : {std::make_pair(ClangTidyTool::instance(),
|
for (const auto &toolInfo :
|
||||||
Constants::RUN_CLANGTIDY_ON_CURRENT_FILE),
|
{std::pair<ClangTool *, Utils::Id>(
|
||||||
std::make_pair(ClazyTool::instance(),
|
ClangTidyTool::instance(), Constants::RUN_CLANGTIDY_ON_CURRENT_FILE),
|
||||||
Constants::RUN_CLAZY_ON_CURRENT_FILE)}) {
|
std::pair<ClangTool *, Utils::Id>(
|
||||||
|
ClazyTool::instance(), Constants::RUN_CLAZY_ON_CURRENT_FILE)}) {
|
||||||
ClangTool * const tool = toolInfo.first;
|
ClangTool * const tool = toolInfo.first;
|
||||||
Command * const cmd = ActionManager::command(toolInfo.second);
|
Command * const cmd = ActionManager::command(toolInfo.second);
|
||||||
QAction *const action = toolsMenu->addAction(tool->name(), [editor, tool] {
|
QAction *const action = toolsMenu->addAction(tool->name(), [editor, tool] {
|
||||||
|
|||||||
@@ -226,7 +226,8 @@ CMakeBuildStep::CMakeBuildStep(BuildStepList *bsl, Id id) :
|
|||||||
|
|
||||||
useStaging.setSettingsKey(USE_STAGING_KEY);
|
useStaging.setSettingsKey(USE_STAGING_KEY);
|
||||||
useStaging.setLabel(Tr::tr("Stage for installation"), BoolAspect::LabelPlacement::AtCheckBox);
|
useStaging.setLabel(Tr::tr("Stage for installation"), BoolAspect::LabelPlacement::AtCheckBox);
|
||||||
useStaging.setDefaultValue(supportsStageForInstallation(kit()));
|
useStaging.setDefaultValue(supportsStageForInstallation(kit()) && !isCleanStep());
|
||||||
|
useStaging.setEnabled(!isCleanStep());
|
||||||
|
|
||||||
stagingDir.setSettingsKey(STAGING_DIR_KEY);
|
stagingDir.setSettingsKey(STAGING_DIR_KEY);
|
||||||
stagingDir.setLabelText(Tr::tr("Staging directory:"));
|
stagingDir.setLabelText(Tr::tr("Staging directory:"));
|
||||||
@@ -522,6 +523,11 @@ void CMakeBuildStep::setBuildPreset(const QString &preset)
|
|||||||
QWidget *CMakeBuildStep::createConfigWidget()
|
QWidget *CMakeBuildStep::createConfigWidget()
|
||||||
{
|
{
|
||||||
auto updateDetails = [this] {
|
auto updateDetails = [this] {
|
||||||
|
const bool haveCleanTarget = m_buildTargets.contains(cleanTarget());
|
||||||
|
useStaging.setEnabled(!haveCleanTarget);
|
||||||
|
if (useStaging() && haveCleanTarget)
|
||||||
|
useStaging.setValue(false);
|
||||||
|
|
||||||
ProcessParameters param;
|
ProcessParameters param;
|
||||||
setupProcessParameters(¶m);
|
setupProcessParameters(¶m);
|
||||||
param.setCommandLine(cmakeCommand());
|
param.setCommandLine(cmakeCommand());
|
||||||
|
|||||||
@@ -1239,6 +1239,7 @@ void CMakeBuildSystem::clearCMakeCache()
|
|||||||
path.removeRecursively();
|
path.removeRecursively();
|
||||||
|
|
||||||
emit configurationCleared();
|
emit configurationCleared();
|
||||||
|
emitParsingFinished(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CMakeBuildSystem::combineScanAndParse(bool restoredFromBackup)
|
void CMakeBuildSystem::combineScanAndParse(bool restoredFromBackup)
|
||||||
|
|||||||
@@ -46,6 +46,19 @@ namespace CMakeProjectManager::Internal {
|
|||||||
|
|
||||||
static Q_LOGGING_CATEGORY(cmInputLog, "qtc.cmake.import", QtWarningMsg);
|
static Q_LOGGING_CATEGORY(cmInputLog, "qtc.cmake.import", QtWarningMsg);
|
||||||
|
|
||||||
|
class ToolchainDescriptionEx
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Utils::FilePath compilerPath;
|
||||||
|
Utils::Id language;
|
||||||
|
QString originalTargetTriple;
|
||||||
|
|
||||||
|
operator ProjectExplorer::ToolchainDescription() const
|
||||||
|
{
|
||||||
|
return ProjectExplorer::ToolchainDescription{compilerPath, language};
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
struct DirectoryData
|
struct DirectoryData
|
||||||
{
|
{
|
||||||
// Project Stuff:
|
// Project Stuff:
|
||||||
@@ -64,7 +77,7 @@ struct DirectoryData
|
|||||||
QString toolset;
|
QString toolset;
|
||||||
FilePath sysroot;
|
FilePath sysroot;
|
||||||
QtProjectImporter::QtVersionData qt;
|
QtProjectImporter::QtVersionData qt;
|
||||||
QVector<ToolchainDescription> toolchains;
|
QVector<ToolchainDescriptionEx> toolchains;
|
||||||
QVariant debugger;
|
QVariant debugger;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -321,12 +334,30 @@ static CMakeConfig configurationFromPresetProbe(
|
|||||||
const PresetsDetails::ConfigurePreset &configurePreset)
|
const PresetsDetails::ConfigurePreset &configurePreset)
|
||||||
{
|
{
|
||||||
const FilePath cmakeListTxt = importPath / Constants::CMAKE_LISTS_TXT;
|
const FilePath cmakeListTxt = importPath / Constants::CMAKE_LISTS_TXT;
|
||||||
cmakeListTxt.writeFileContents(QByteArray("cmake_minimum_required(VERSION 3.15)\n"
|
cmakeListTxt.writeFileContents(QByteArray(R"(
|
||||||
"\n"
|
cmake_minimum_required(VERSION 3.15)
|
||||||
"project(preset-probe)\n"
|
|
||||||
"set(CMAKE_C_COMPILER \"${CMAKE_C_COMPILER}\" CACHE FILEPATH \"\" FORCE)\n"
|
project(preset-probe)
|
||||||
"set(CMAKE_CXX_COMPILER \"${CMAKE_CXX_COMPILER}\" CACHE FILEPATH \"\" FORCE)\n"
|
|
||||||
"\n"));
|
foreach (file_path_value
|
||||||
|
CMAKE_C_COMPILER CMAKE_CXX_COMPILER CMAKE_SYSROOT QT_HOST_PATH CMAKE_MAKE_PROGRAM)
|
||||||
|
if (${file_path_value})
|
||||||
|
set(${file_path_value} "${${file_path_value}}" CACHE FILEPATH "" FORCE)
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
foreach (path_value CMAKE_PREFIX_PATH CMAKE_FIND_ROOT_PATH)
|
||||||
|
if (${path_value})
|
||||||
|
set(${path_value} "${${path_value}}" CACHE PATH "" FORCE)
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
|
||||||
|
foreach (string_value CMAKE_C_COMPILER_TARGET CMAKE_CXX_COMPILER_TARGET)
|
||||||
|
if (${string_value})
|
||||||
|
set(${string_value} "${${string_value}}" CACHE STRING "" FORCE)
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
)"));
|
||||||
|
|
||||||
Process cmake;
|
Process cmake;
|
||||||
cmake.setDisableUnixTerminal();
|
cmake.setDisableUnixTerminal();
|
||||||
@@ -574,9 +605,9 @@ static QMakeAndCMakePrefixPath qtInfoFromCMakeCache(const CMakeConfig &config,
|
|||||||
return {qmakeLocation, resultedPrefixPath};
|
return {qmakeLocation, resultedPrefixPath};
|
||||||
}
|
}
|
||||||
|
|
||||||
static QVector<ToolchainDescription> extractToolchainsFromCache(const CMakeConfig &config)
|
static QVector<ToolchainDescriptionEx> extractToolchainsFromCache(const CMakeConfig &config)
|
||||||
{
|
{
|
||||||
QVector<ToolchainDescription> result;
|
QVector<ToolchainDescriptionEx> result;
|
||||||
bool haveCCxxCompiler = false;
|
bool haveCCxxCompiler = false;
|
||||||
for (const CMakeConfigItem &i : config) {
|
for (const CMakeConfigItem &i : config) {
|
||||||
if (!i.key.startsWith("CMAKE_") || !i.key.endsWith("_COMPILER"))
|
if (!i.key.startsWith("CMAKE_") || !i.key.endsWith("_COMPILER"))
|
||||||
@@ -593,7 +624,10 @@ static QVector<ToolchainDescription> extractToolchainsFromCache(const CMakeConfi
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
languageId = Id::fromName(language);
|
languageId = Id::fromName(language);
|
||||||
result.append({FilePath::fromUtf8(i.value), languageId});
|
result.append(
|
||||||
|
{FilePath::fromUtf8(i.value),
|
||||||
|
languageId,
|
||||||
|
config.stringValueOf("CMAKE_" + language + "_COMPILER_TARGET")});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!haveCCxxCompiler) {
|
if (!haveCCxxCompiler) {
|
||||||
@@ -612,10 +646,14 @@ static QVector<ToolchainDescription> extractToolchainsFromCache(const CMakeConfi
|
|||||||
const FilePath linker = config.filePathValueOf("CMAKE_LINKER");
|
const FilePath linker = config.filePathValueOf("CMAKE_LINKER");
|
||||||
if (!linker.isEmpty()) {
|
if (!linker.isEmpty()) {
|
||||||
const FilePath compilerPath = linker.parentDir();
|
const FilePath compilerPath = linker.parentDir();
|
||||||
result.append({compilerPath.pathAppended(cCompilerName),
|
result.append(
|
||||||
ProjectExplorer::Constants::C_LANGUAGE_ID});
|
{compilerPath.pathAppended(cCompilerName),
|
||||||
result.append({compilerPath.pathAppended(cxxCompilerName),
|
ProjectExplorer::Constants::C_LANGUAGE_ID,
|
||||||
ProjectExplorer::Constants::CXX_LANGUAGE_ID});
|
{}});
|
||||||
|
result.append(
|
||||||
|
{compilerPath.pathAppended(cxxCompilerName),
|
||||||
|
ProjectExplorer::Constants::CXX_LANGUAGE_ID,
|
||||||
|
{}});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1052,7 +1090,7 @@ bool CMakeProjectImporter::matchKit(void *directoryData, const Kit *k) const
|
|||||||
|
|
||||||
const bool compilersMatch = [k, data] {
|
const bool compilersMatch = [k, data] {
|
||||||
const QList<Id> allLanguages = ToolchainManager::allLanguages();
|
const QList<Id> allLanguages = ToolchainManager::allLanguages();
|
||||||
for (const ToolchainDescription &tcd : data->toolchains) {
|
for (const ToolchainDescriptionEx &tcd : data->toolchains) {
|
||||||
if (!Utils::contains(allLanguages,
|
if (!Utils::contains(allLanguages,
|
||||||
[&tcd](const Id &language) { return language == tcd.language; }))
|
[&tcd](const Id &language) { return language == tcd.language; }))
|
||||||
continue;
|
continue;
|
||||||
@@ -1065,7 +1103,7 @@ bool CMakeProjectImporter::matchKit(void *directoryData, const Kit *k) const
|
|||||||
}();
|
}();
|
||||||
const bool noCompilers = [k, data] {
|
const bool noCompilers = [k, data] {
|
||||||
const QList<Id> allLanguages = ToolchainManager::allLanguages();
|
const QList<Id> allLanguages = ToolchainManager::allLanguages();
|
||||||
for (const ToolchainDescription &tcd : data->toolchains) {
|
for (const ToolchainDescriptionEx &tcd : data->toolchains) {
|
||||||
if (!Utils::contains(allLanguages,
|
if (!Utils::contains(allLanguages,
|
||||||
[&tcd](const Id &language) { return language == tcd.language; }))
|
[&tcd](const Id &language) { return language == tcd.language; }))
|
||||||
continue;
|
continue;
|
||||||
@@ -1117,7 +1155,7 @@ Kit *CMakeProjectImporter::createKit(void *directoryData) const
|
|||||||
|
|
||||||
SysRootKitAspect::setSysRoot(k, data->sysroot);
|
SysRootKitAspect::setSysRoot(k, data->sysroot);
|
||||||
|
|
||||||
for (const ToolchainDescription &cmtcd : data->toolchains) {
|
for (const ToolchainDescriptionEx &cmtcd : data->toolchains) {
|
||||||
const ToolchainData tcd = findOrCreateToolchains(cmtcd);
|
const ToolchainData tcd = findOrCreateToolchains(cmtcd);
|
||||||
QTC_ASSERT(!tcd.tcs.isEmpty(), continue);
|
QTC_ASSERT(!tcd.tcs.isEmpty(), continue);
|
||||||
|
|
||||||
@@ -1126,7 +1164,11 @@ Kit *CMakeProjectImporter::createKit(void *directoryData) const
|
|||||||
addTemporaryData(ToolchainKitAspect::id(), tc->id(), k);
|
addTemporaryData(ToolchainKitAspect::id(), tc->id(), k);
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolchainKitAspect::setToolchain(k, tcd.tcs.at(0));
|
Toolchain* toolchain = tcd.tcs.at(0);
|
||||||
|
if (!cmtcd.originalTargetTriple.isEmpty())
|
||||||
|
toolchain->setExplicitCodeModelTargetTriple(cmtcd.originalTargetTriple);
|
||||||
|
|
||||||
|
ToolchainKitAspect::setToolchain(k, toolchain);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!data->cmakePresetDisplayname.isEmpty()) {
|
if (!data->cmakePresetDisplayname.isEmpty()) {
|
||||||
@@ -1335,7 +1377,7 @@ void CMakeProjectImporterTest::testCMakeProjectImporterToolchain()
|
|||||||
config.append(CMakeConfigItem(key.toUtf8(), value.toUtf8()));
|
config.append(CMakeConfigItem(key.toUtf8(), value.toUtf8()));
|
||||||
}
|
}
|
||||||
|
|
||||||
const QVector<ToolchainDescription> tcs = extractToolchainsFromCache(config);
|
const QVector<ToolchainDescriptionEx> tcs = extractToolchainsFromCache(config);
|
||||||
QCOMPARE(tcs.count(), expectedLanguages.count());
|
QCOMPARE(tcs.count(), expectedLanguages.count());
|
||||||
for (int i = 0; i < tcs.count(); ++i) {
|
for (int i = 0; i < tcs.count(); ++i) {
|
||||||
QCOMPARE(tcs.at(i).language, expectedLanguages.at(i));
|
QCOMPARE(tcs.at(i).language, expectedLanguages.at(i));
|
||||||
|
|||||||
@@ -542,6 +542,7 @@ public:
|
|||||||
void positionShow(const TextEditorWidget *editorWidget);
|
void positionShow(const TextEditorWidget *editorWidget);
|
||||||
|
|
||||||
void updateTooltip(DebuggerEngine *engine);
|
void updateTooltip(DebuggerEngine *engine);
|
||||||
|
void updateTooltip2(DebuggerEngine *engine);
|
||||||
|
|
||||||
void setState(DebuggerTooltipState newState);
|
void setState(DebuggerTooltipState newState);
|
||||||
void destroy();
|
void destroy();
|
||||||
@@ -660,6 +661,11 @@ DebuggerToolTipHolder::DebuggerToolTipHolder(const DebuggerToolTipContext &conte
|
|||||||
// after normal WatchModel update.
|
// after normal WatchModel update.
|
||||||
|
|
||||||
void DebuggerToolTipHolder::updateTooltip(DebuggerEngine *engine)
|
void DebuggerToolTipHolder::updateTooltip(DebuggerEngine *engine)
|
||||||
|
{
|
||||||
|
QTimer::singleShot(0, [this, engine] { updateTooltip2(engine); });
|
||||||
|
}
|
||||||
|
|
||||||
|
void DebuggerToolTipHolder::updateTooltip2(DebuggerEngine *engine)
|
||||||
{
|
{
|
||||||
widget->setEngine(engine);
|
widget->setEngine(engine);
|
||||||
|
|
||||||
|
|||||||
@@ -992,12 +992,12 @@ IosToolTaskAdapter::IosToolTaskAdapter() {}
|
|||||||
|
|
||||||
void IosToolTaskAdapter::start()
|
void IosToolTaskAdapter::start()
|
||||||
{
|
{
|
||||||
task()->m_iosToolHandler = new IosToolHandler(Internal::IosDeviceType(task()->m_deviceType));
|
task()->m_iosToolHandler.reset(new IosToolHandler(Internal::IosDeviceType(task()->m_deviceType)));
|
||||||
connect(task()->m_iosToolHandler, &IosToolHandler::finished, this, [this] {
|
connect(task()->m_iosToolHandler.get(), &IosToolHandler::finished, this, [this] {
|
||||||
task()->m_iosToolHandler->deleteLater();
|
task()->m_iosToolHandler.release()->deleteLater();
|
||||||
emit done(Tasking::DoneResult::Success);
|
emit done(Tasking::DoneResult::Success);
|
||||||
});
|
});
|
||||||
task()->m_startHandler(task()->m_iosToolHandler);
|
task()->m_startHandler(task()->m_iosToolHandler.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace Ios
|
} // namespace Ios
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
friend class IosToolTaskAdapter;
|
friend class IosToolTaskAdapter;
|
||||||
IosToolHandler *m_iosToolHandler = nullptr;
|
std::unique_ptr<IosToolHandler> m_iosToolHandler;
|
||||||
StartHandler m_startHandler;
|
StartHandler m_startHandler;
|
||||||
Internal::IosDeviceType m_deviceType = Internal::IosDeviceType::IosDevice;
|
Internal::IosDeviceType m_deviceType = Internal::IosDeviceType::IosDevice;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -480,6 +480,11 @@ QmlJSEditorDocumentPrivate::QmlJSEditorDocumentPrivate(QmlJSEditorDocument *pare
|
|||||||
this, &QmlJSEditorDocumentPrivate::onDocumentUpdated);
|
this, &QmlJSEditorDocumentPrivate::onDocumentUpdated);
|
||||||
connect(QmllsSettingsManager::instance(), &QmllsSettingsManager::settingsChanged,
|
connect(QmllsSettingsManager::instance(), &QmllsSettingsManager::settingsChanged,
|
||||||
this, &QmlJSEditorDocumentPrivate::settingsChanged);
|
this, &QmlJSEditorDocumentPrivate::settingsChanged);
|
||||||
|
connect(
|
||||||
|
modelManager,
|
||||||
|
&ModelManagerInterface::projectInfoUpdated,
|
||||||
|
this,
|
||||||
|
&QmlJSEditorDocumentPrivate::settingsChanged);
|
||||||
|
|
||||||
// semantic info
|
// semantic info
|
||||||
m_semanticInfoUpdater = new SemanticInfoUpdater();
|
m_semanticInfoUpdater = new SemanticInfoUpdater();
|
||||||
@@ -749,7 +754,7 @@ static FilePath qmllsForFile(const FilePath &file, QmlJS::ModelManagerInterface
|
|||||||
< QmlJsEditingSettings::mininumQmllsVersion) {
|
< QmlJsEditingSettings::mininumQmllsVersion) {
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
return pInfo.qmllsPath;
|
return pInfo.qmllsPath.exists() ? pInfo.qmllsPath : Utils::FilePath();
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlJSEditorDocumentPrivate::settingsChanged()
|
void QmlJSEditorDocumentPrivate::settingsChanged()
|
||||||
|
|||||||
@@ -2339,6 +2339,13 @@ void TextEditorWidget::selectWordUnderCursor()
|
|||||||
setMultiTextCursor(cursor);
|
setMultiTextCursor(cursor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TextEditorWidget::clearSelection()
|
||||||
|
{
|
||||||
|
MultiTextCursor cursor = multiTextCursor();
|
||||||
|
cursor.clearSelection();
|
||||||
|
setMultiTextCursor(cursor);
|
||||||
|
}
|
||||||
|
|
||||||
void TextEditorWidget::showContextMenu()
|
void TextEditorWidget::showContextMenu()
|
||||||
{
|
{
|
||||||
QTextCursor tc = textCursor();
|
QTextCursor tc = textCursor();
|
||||||
@@ -4259,6 +4266,10 @@ void TextEditorWidgetPrivate::registerActions()
|
|||||||
.setContext(m_editorContext)
|
.setContext(m_editorContext)
|
||||||
.addOnTriggered([this] { q->selectWordUnderCursor(); })
|
.addOnTriggered([this] { q->selectWordUnderCursor(); })
|
||||||
.setScriptable(true);
|
.setScriptable(true);
|
||||||
|
ActionBuilder(this, CLEAR_SELECTION)
|
||||||
|
.setContext(m_editorContext)
|
||||||
|
.addOnTriggered([this] { q->clearSelection(); })
|
||||||
|
.setScriptable(true);
|
||||||
|
|
||||||
ActionBuilder(this, GOTO_DOCUMENT_START)
|
ActionBuilder(this, GOTO_DOCUMENT_START)
|
||||||
.setContext(m_editorContext)
|
.setContext(m_editorContext)
|
||||||
@@ -4769,8 +4780,11 @@ void TextEditorWidgetPrivate::highlightSearchResults(const QTextBlock &block, co
|
|||||||
break;
|
break;
|
||||||
if (m_findFlags & FindWholeWords) {
|
if (m_findFlags & FindWholeWords) {
|
||||||
auto posAtWordSeparator = [](const QString &text, int idx) {
|
auto posAtWordSeparator = [](const QString &text, int idx) {
|
||||||
if (idx < 0 || idx >= text.length())
|
if (idx < 0)
|
||||||
return false;
|
return QTC_GUARD(idx == -1);
|
||||||
|
int textLength = text.length();
|
||||||
|
if (idx >= textLength)
|
||||||
|
return QTC_GUARD(idx == textLength);
|
||||||
const QChar c = text.at(idx);
|
const QChar c = text.at(idx);
|
||||||
return !c.isLetterOrNumber() && c != QLatin1Char('_');
|
return !c.isLetterOrNumber() && c != QLatin1Char('_');
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -430,6 +430,7 @@ public:
|
|||||||
virtual bool selectBlockUp();
|
virtual bool selectBlockUp();
|
||||||
virtual bool selectBlockDown();
|
virtual bool selectBlockDown();
|
||||||
void selectWordUnderCursor();
|
void selectWordUnderCursor();
|
||||||
|
void clearSelection();
|
||||||
|
|
||||||
void showContextMenu();
|
void showContextMenu();
|
||||||
|
|
||||||
|
|||||||
@@ -143,6 +143,7 @@ const char GOTO_BLOCK_END_WITH_SELECTION[] = "TextEditor.GotoBlockEndWithSelecti
|
|||||||
const char SELECT_BLOCK_UP[] = "TextEditor.SelectBlockUp";
|
const char SELECT_BLOCK_UP[] = "TextEditor.SelectBlockUp";
|
||||||
const char SELECT_BLOCK_DOWN[] = "TextEditor.SelectBlockDown";
|
const char SELECT_BLOCK_DOWN[] = "TextEditor.SelectBlockDown";
|
||||||
const char SELECT_WORD_UNDER_CURSOR[] = "TextEditor.SelectWordUnderCursor";
|
const char SELECT_WORD_UNDER_CURSOR[] = "TextEditor.SelectWordUnderCursor";
|
||||||
|
const char CLEAR_SELECTION[] = "TextEditor.ClearSelection";
|
||||||
const char VIEW_PAGE_UP[] = "TextEditor.viewPageUp";
|
const char VIEW_PAGE_UP[] = "TextEditor.viewPageUp";
|
||||||
const char VIEW_PAGE_DOWN[] = "TextEditor.viewPageDown";
|
const char VIEW_PAGE_DOWN[] = "TextEditor.viewPageDown";
|
||||||
const char VIEW_LINE_UP[] = "TextEditor.viewLineUp";
|
const char VIEW_LINE_UP[] = "TextEditor.viewLineUp";
|
||||||
|
|||||||
@@ -544,6 +544,8 @@ void TextEditorPlugin::createEditorCommands()
|
|||||||
.setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+Shift+Alt+U")))
|
.setDefaultKeySequence(QKeySequence(Tr::tr("Ctrl+Shift+Alt+U")))
|
||||||
.addToContainer(M_EDIT_ADVANCED, G_EDIT_BLOCKS);
|
.addToContainer(M_EDIT_ADVANCED, G_EDIT_BLOCKS);
|
||||||
TextActionBuilder(this, SELECT_WORD_UNDER_CURSOR).setText(Tr::tr("Select Word Under Cursor"));
|
TextActionBuilder(this, SELECT_WORD_UNDER_CURSOR).setText(Tr::tr("Select Word Under Cursor"));
|
||||||
|
TextActionBuilder(this, CLEAR_SELECTION)
|
||||||
|
.setText(QCoreApplication::translate("QtC::Terminal", "Clear Selection"));
|
||||||
|
|
||||||
TextActionBuilder(this, GOTO_DOCUMENT_START).setText(Tr::tr("Go to Document Start"));
|
TextActionBuilder(this, GOTO_DOCUMENT_START).setText(Tr::tr("Go to Document Start"));
|
||||||
TextActionBuilder(this, GOTO_DOCUMENT_END).setText(Tr::tr("Go to Document End"));
|
TextActionBuilder(this, GOTO_DOCUMENT_END).setText(Tr::tr("Go to Document End"));
|
||||||
|
|||||||