Merge remote-tracking branch 'origin/4.12' into qds-1.50

Change-Id: Ia70d4b47f578021f29197a22b3e07e792342d05c
This commit is contained in:
Tim Jenssen
2020-05-15 17:20:20 +02:00
56 changed files with 575 additions and 433 deletions

View File

@@ -17,6 +17,9 @@ macro.note = "\\b{Note:}"
macro.oslash.HTML = "ø" macro.oslash.HTML = "ø"
macro.ouml.HTML = "ö" macro.ouml.HTML = "ö"
macro.QA = "Qt Assistant" macro.QA = "Qt Assistant"
macro.QB = "Qt Bridge"
macro.QBPS = "Qt Bridge for Adobe Photoshop"
macro.QBSK = "Qt Bridge for Sketch"
macro.QC = "$IDE_DISPLAY_NAME" macro.QC = "$IDE_DISPLAY_NAME"
macro.QCE = "$IDE_DISPLAY_NAME Enterprise" macro.QCE = "$IDE_DISPLAY_NAME Enterprise"
macro.QD = "Qt Designer" macro.QD = "Qt Designer"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

View File

@@ -102,18 +102,18 @@
\list \list
\li Qt Quick Application - Empty \li Qt Quick Application - Empty
Create an empty Qt Quick application that uses Qt Quick 2 types. Create an empty \l{Qt Quick} application that uses Qt Quick 2
types.
You can build the application and deploy it to desktop, You can build the application and deploy it to desktop,
embedded, and mobile target platforms. embedded, and mobile target platforms.
\li Qt Quick Application - Scroll, Stack, or Swipe \li Qt Quick Application - Scroll, Stack, or Swipe
Create a Qt Quick application that uses Create a Qt Quick application that uses \l{Qt Quick Controls} to
\l{http://doc.qt.io/qt-5/qtquickcontrols2-index.html} implement a scrollable list (requires Qt 5.9 or later) or a set
{Qt Quick Controls} to implement a scrollable list (requires of pages with a stack-based or swipe-based navigation model
Qt 5.9 or later) or a set of pages with a stack-based or (requires Qt 5.7 or later).
swipe-based navigation model (requires Qt 5.7 or later).
\endlist \endlist
\li Application (Qt) \li Application (Qt)
@@ -150,8 +150,8 @@
\list \list
\li MCU Support Application \li MCU Support Application
Creates an application that uses a subset of QML and Creates an application that uses a subset of Qt QML and
Qt Quick Controls (as supported by Qt for MCUs) that Qt Quick Controls types (as supported by Qt for MCUs) that
you can deploy, run, and debug on MCU boards. For more you can deploy, run, and debug on MCU boards. For more
information, see \l {Connecting MCUs}. information, see \l {Connecting MCUs}.
\endlist \endlist

View File

@@ -127,7 +127,7 @@
\endlist \endlist
\li \l{Importing 3D Assets} \li \l{Importing 3D Assets}
\li \l{Editing 3D Assets in Design Mode} \li \l{Editing 3D Assets in Design Mode}
\li \l{Working in the 3D Editor} \li \l{Working in 3D Editor}
\li \l{Adding 3D Views} \li \l{Adding 3D Views}
\li \l{Using 3D Components} \li \l{Using 3D Components}
\list \list

View File

@@ -26,20 +26,23 @@
/*! /*!
//! [scxml state machines] //! [scxml state machines]
\section2 Using SCXML State Machines \section1 Using SCXML State Machines
To use QML together with an SCXML state machine, add states and bind them to To use QML together with an SCXML state machine, add states and
the state machine in the \uicontrol Backends tab in the Design mode, as bind them to the state machine in the \uicontrol Backends tab
of the \uicontrol Connections view, as
described in \l {Managing C++ Backend Objects}. described in \l {Managing C++ Backend Objects}.
In the \uicontrol States view, you can edit the \c when condition of states In the \uicontrol States view, you can select \uicontrol Actions >
\uicontrol {Set when Condition} to edit the \c when condition of states
to map QML states to the states of the SCXML state machine. For an example, to map QML states to the states of the SCXML state machine. For an example,
see \l {Qt SCXML Traffic Light QML Example (Dynamic)}. see \l {Qt SCXML Traffic Light QML Example (Dynamic)}.
\image qmldesigner-states-when-condition.png \image qmldesigner-states-when-condition.png
If you add animation to the states, you can run the application to test the If you add animation to the states, you can \l{Previewing}{preview}
animation. or \l{Running on Multiple Platforms}{run} the application to test
the animation.
//! [scxml state machines] //! [scxml state machines]
*/ */

View File

@@ -51,14 +51,15 @@
\image qmldesigner-qml-components.png "QML Components" \image qmldesigner-qml-components.png "QML Components"
The \uicontrol {QML Types} tab displays the QML types grouped by category: The \uicontrol {QML Types} tab displays the QML types grouped by category,
your own QML components, basic types, layouts, positioner types, and views. such as your own QML components, basic types, layouts, positioner types, and
views.
Sets of UI components with the look and feel of a particular mobile device Sets of UI components with the look and feel of a particular mobile device
platform have been defined for Qt Quick 1. Since Qt 5.1, ready-made Qt platform have been defined for Qt Quick 1. Since Qt 5.1, ready-made Qt
Quick Controls, Dialogs, and Layouts are available for creating user Quick Controls, Dialogs, and Layouts are available for creating user
interfaces using Qt Quick 2. The components and controls are based on interfaces using Qt Quick 2. The components and controls are based on
standard QML types. To view the components and controls in the standard QML types. To view the components and controls in
\uicontrol {Library}, import the component sets in \uicontrol {QML Imports}. \uicontrol {Library}, import the component sets in \uicontrol {QML Imports}.
The \uicontrol {Qt Quick Application} wizards for a particular platform add The \uicontrol {Qt Quick Application} wizards for a particular platform add
@@ -70,21 +71,23 @@
\section1 Adding Components to Designs \section1 Adding Components to Designs
\image studio-design-mode.png "Design mode" \image qmldesigner-editing-components.png "Editing QML components in Design mode"
\list 1 \list 1
\li Drag and drop components from the \uicontrol Library (2) to the \li Drag and drop components from \uicontrol Library (1) to
\uicontrol Navigator (3) or \uicontrol {Form Editor} (1). \uicontrol Navigator (2) or \uicontrol {Form Editor} (3).
\li Select components in the \uicontrol Navigator to edit their \li Select components in \uicontrol Navigator to edit their
properties in the \uicontrol Properties view (4). For more properties in \uicontrol Properties.
information, see \l {Specifying Item Properties}. \image qmldesigner-properties-view.png "Properties view"
For more information, see \l {Specifying Item Properties}.
\li Connect components to signals or create bindings between components \li Connect components to signals or create bindings between components
in the \uicontrol Connections view (5). For more information, see in the \uicontrol Connections view.
\l{Adding Connections}. \image qmldesigner-bindings.png "Connections view Bindings tab"
For more information, see \l{Adding Connections}.
\li Add states to apply sets of changes to the properties of one or \li Add states to apply sets of changes to the properties of one or
several components in the \uicontrol States view (6). For more several components in the \uicontrol States view.
information, see \l{Adding States}. For more information, see \l{Adding States}.
\li Animate component properties in the \uicontrol Timeline view (7). \li Animate component properties in the \uicontrol Timeline view.
For more information, see \l{Creating Animations}. For more information, see \l{Creating Animations}.
\endlist \endlist
@@ -136,12 +139,12 @@
When you add a \l{GridView}{Grid View}, \l{ListView}{List View}, or When you add a \l{GridView}{Grid View}, \l{ListView}{List View}, or
\l{PathView}{Path View}, the ListModel and the delegate component that \l{PathView}{Path View}, the ListModel and the delegate component that
creates an instance for each item in the model are added automatically. creates an instance for each item in the model are added automatically.
You can edit item properties in the \uicontrol Properties view or You can edit item properties in \uicontrol Properties or in
in the \uicontrol {Text Editor}. You can also replace the default model and \uicontrol {Text Editor}. You can also replace the default model and
delegate with other, more complex models and delegates in the delegate with other, more complex models and delegates in
\uicontrol {Text Editor}. \l{ItemDelegate}{Item Delegate} and \uicontrol {Text Editor}. \l{ItemDelegate}{Item Delegate} and
\l{SwipeDelegate}{Swipe Delegate} delegate components are also available \l{SwipeDelegate}{Swipe Delegate} delegate components are also available
in the \uicontrol Library. in \uicontrol Library.
\section1 Positioning Items in UIs \section1 Positioning Items in UIs
@@ -179,7 +182,7 @@
\image qmldesigner-set-expression.png "Type properties context menu" \image qmldesigner-set-expression.png "Type properties context menu"
In the \uicontrol {Binding Editor}, select an item and a property from In \uicontrol {Binding Editor}, select an item and a property from
lists of available items and their properties. lists of available items and their properties.
\image qmldesigner-binding-editor.png "Binding Editor" \image qmldesigner-binding-editor.png "Binding Editor"
@@ -192,7 +195,7 @@
When a binding is set, the \uicontrol Actions menu icon changes to When a binding is set, the \uicontrol Actions menu icon changes to
\inlineimage icons/action-icon-binding \inlineimage icons/action-icon-binding
. To remove bindings, select \uicontrol Reset in the \uicontrol Actions menu. . To remove bindings, select \uicontrol Actions > \uicontrol Reset.
You can set bindings also in the \uicontrol Connections view. For more You can set bindings also in the \uicontrol Connections view. For more
information, see \l {Adding Bindings Between Properties}. information, see \l {Adding Bindings Between Properties}.
@@ -227,7 +230,7 @@
(\uicontrol {Reset Anchors}) button to reset the anchors to their saved (\uicontrol {Reset Anchors}) button to reset the anchors to their saved
state. state.
You can specify the baseline anchor in the \uicontrol {Text Editor} in the You can specify the baseline anchor in \uicontrol {Text Editor} in the
Design mode. Design mode.
For performance reasons, you can only anchor an item to its siblings For performance reasons, you can only anchor an item to its siblings
@@ -340,8 +343,9 @@
\endlist \endlist
To position several items in a \uicontrol Column, \uicontrol Row, To position several items in a \uicontrol Column, \uicontrol Row,
\uicontrol Grid, or \uicontrol Flow, select the items on the canvas, and \uicontrol Grid, or \uicontrol Flow, select the items in
then select \uicontrol Position in the context menu. \uicontrol {Form Editor}, and then select \uicontrol Position in
the context menu.
\section2 Using Layouts \section2 Using Layouts
@@ -353,8 +357,6 @@
You can use the following layout types to arrange items in UIs: You can use the following layout types to arrange items in UIs:
\list \list
\li \l{Layout} provides attached properties for items pushed onto a
column, row, or grid layout.
\li \l{ColumnLayout}{Column Layout} provides a grid layout with only \li \l{ColumnLayout}{Column Layout} provides a grid layout with only
one column. one column.
\li \l{RowLayout}{Row Layout} provides a grid layout with only one row. \li \l{RowLayout}{Row Layout} provides a grid layout with only one row.
@@ -365,7 +367,7 @@
\endlist \endlist
To lay out several items in a column, row, grid, or To lay out several items in a column, row, grid, or
\uicontrol {Stack Layout}, select the items in the \uicontrol {Form Editor}, \uicontrol {Stack Layout}, select the items in \uicontrol {Form Editor},
and then select \uicontrol Layout in the context menu. and then select \uicontrol Layout in the context menu.
You can also click the \inlineimage column.png You can also click the \inlineimage column.png
@@ -374,9 +376,9 @@
(\uicontrol {Grid Layout}) toolbar buttons to apply (\uicontrol {Grid Layout}) toolbar buttons to apply
layouts to the selected items. layouts to the selected items.
To make an item within a layout as wide as possible while respecting To make an item within a layout as wide as possible while respecting the
the given constraints, select the item on the canvas and then select given constraints, select the item in \uicontrol {Form Editor}, and then
\uicontrol Layout > \uicontrol {Fill Width} in the context menu. To select \uicontrol Layout > \uicontrol {Fill Width} in the context menu. To
make the item as high as possible, select \uicontrol {Fill Height}. make the item as high as possible, select \uicontrol {Fill Height}.
\section2 Editing Stack Layouts \section2 Editing Stack Layouts
@@ -385,7 +387,7 @@
To add items to a \uicontrol {Stack Layout}, select the To add items to a \uicontrol {Stack Layout}, select the
\inlineimage plus.png \inlineimage plus.png
button next to the type name in the \uicontrol {Form Editor}. To move button next to the type name in \uicontrol {Form Editor}. To move
between items, select the \inlineimage prev.png between items, select the \inlineimage prev.png
(\uicontrol Previous) and \inlineimage next.png (\uicontrol Previous) and \inlineimage next.png
(\uicontrol Next) buttons. (\uicontrol Next) buttons.
@@ -550,22 +552,22 @@
\endif \endif
\uicontrol Choose to create a new .qml file. \uicontrol Choose to create a new .qml file.
\note Components are listed in the \uicontrol {QML Components} section of \note Components are listed in the \uicontrol {My QML Components}
the \uicontrol Library only if the filename begins with a capital tab in the \uicontrol Library view only if the filename begins with
letter. a capital letter.
\li Click \uicontrol Design to open the .qml file in the Design mode. \li Click \uicontrol Design to open the .qml file in the Design mode.
\li Drag and drop a QML type from the \uicontrol Library to the \li Drag and drop a QML type from \uicontrol Library to
\uicontrol Navigator or \uicontrol {Form Editor}. \uicontrol Navigator or \uicontrol {Form Editor}.
\li Edit its properties in the \uicontrol Properties view. \li Edit its properties in \uicontrol Properties.
The available properties depend on the QML type. The available properties depend on the QML type.
\endlist \endlist
The following sections contain more information about how to use the The following sections contain more information about how to use
\uicontrol {Form Editor} to edit 2D content, as well as examples of \uicontrol {Form Editor} to edit 2D content, as well as examples of
how to create some common components using basic QML types: how to create some common components using basic QML types:
@@ -582,10 +584,11 @@
\section1 Moving Within Components \section1 Moving Within Components
Components can consist of several other components. To view the component Components can consist of several other components. To view the component
hierarchy as a bread crumb path when you edit a component on the canvas, hierarchy as a bread crumb path when you edit a component in
select \uicontrol {Go into Component} or press \key F2. Click the component \uicontrol {Form Editor}, select \uicontrol {Go into Component} or press
names in the path to navigate to them. You can easily navigate back to the \key F2. Click the component names in the path to navigate to them. You
top level when you are done editing the component. can easily navigate back to the top level when you are done editing the
component.
\image qmldesigner-breadcrumbs.png "Go into Component command" \image qmldesigner-breadcrumbs.png "Go into Component command"
*/ */

View File

@@ -37,7 +37,7 @@
The bottom part of the view displays properties that are specific to each The bottom part of the view displays properties that are specific to each
QML type. For example, the following image displays the properties you can QML type. For example, the following image displays the properties you can
set for \uicontrol Rectangle (1) and \uicontrol Text (2) items. set for \uicontrol Rectangle and \uicontrol Text items.
\image qmldesigner-element-properties.png \image qmldesigner-element-properties.png

View File

@@ -55,57 +55,60 @@
\list \list
\li Show some UI items and hide others. \li Show some UI items and hide others.
\li Present different available actions to the user. \li Present different available actions to the user.
\li Start, stop or pause animations. \li Start, stop, or pause animations.
\li Execute some script required in the new state. \li Execute some script required in the new state.
\li Change a property value for a particular item. \li Change a property value for a particular item.
\li Show a different view. \li Show a different view.
\endlist \endlist
\section1 Creating States
The \uicontrol States view displays the different \l{State}{states} The \uicontrol States view displays the different \l{State}{states}
of the component in the Design mode. The \uicontrol States view is of a UI, beginning with a \e {base state}.
collapsed by default to save space. Select \uicontrol Expand in
the context menu to view the whole view.
\image qmldesigner-transitions.png "States view" \image qmldesigner-transitions.png "States view"
To add states, click the \inlineimage plus.png To add states, click the \inlineimage plus.png
button. Then modify the new state in the editor. For example, to change the button. Click the new state to switch to it in \uicontrol {Form Editor},
appearance of a button, you can hide the button image and show another image and then modify the properties of components in \uicontrol Properties.
in its place. Or, to add movement to the view, you can change the position
of an object on the canvas and then add animation to the change between the
states.
To determine when the state should be applied, select For example, to change the appearance of a button, you can hide the button
\uicontrol {Set when Condition} in the menu and specify a image and show another image in its place. Or, to add movement to the view,
\l [QtQuick]{State::when}{when} property for the state. you can change the position of an object in \uicontrol {Form Editor}
Set the value of the property to an expression that and then add animation to the change between the states.
evaluates to \c true when you want the state to be applied.
In the binding editor, select the component and property to
create the expression. For example, to change the state when
a button is pressed, you could select a button component and
its pressed property.
\image qtquick-states-binding-editor.png "Binding editor in States view"
You can preview the states in the \uicontrol States view and click them to
switch between states on the canvas.
\section1 Using States
QML states typically describe user interface configurations, such as the UI
controls, their properties and behavior and the available actions. For
example, you can use states to create two views.
To add states, click the empty slot in the \uicontrol States view.
Then modify the new state in the \uicontrol {Form Editor} or the
\uicontrol Properties view.
\image qmldesigner-states.png "States view"
The properties that you change in a state are highlighted with blue color. The properties that you change in a state are highlighted with blue color.
In the \uicontrol {Text Editor}, you can see the changes recorded as changes In \uicontrol {Text Editor}, you can see the changes recorded as changes
to the base state. to the base state.
\image qmldesigner-states.png "States and Properties views"
\section1 Setting the Default State
To determine the startup state of the application,
select \inlineimage icons/action-icon.png
to open the \uicontrol Actions menu, and then select
\uicontrol {Set as Default}.
To reset the state later, select \uicontrol Actions >
\uicontrol {Reset Default}.
\section1 Applying States
To determine when a state should be applied, select \uicontrol Actions >
\uicontrol {Set when Condition}. In \uicontrol {Binding Editor}, specify
a \l [QtQuick]{State::when}{when} property for the state. Set the value of
the property to an expression that evaluates to \c true when you want the
state to be applied.
In \uicontrol {Binding Editor}, select the component and property to
create the expression. For example, to change the state when a button is
pressed, you could select a button component and its pressed property.
\image qtquick-states-binding-editor.png "Binding Editor in States view"
\section1 Using States
To keep the QML code clean, you should create a base state that contains all To keep the QML code clean, you should create a base state that contains all
the types you will need in the application. You can then create states, the types you will need in the application. You can then create states,
in which you hide and show a set of items and modify their properties. in which you hide and show a set of items and modify their properties.
@@ -124,30 +127,24 @@
To create views for an application by using states: To create views for an application by using states:
\image qmldesigner-screen-design.png "Designing views"
\list 1 \list 1
\li In the base state, add all items you will need in the application \li In the base state, add all items you will need in the application
(1). While you work on one view, you can click the (1). While you work on one view, you can click the
\inlineimage eye_open.png \inlineimage eye_open.png
icon to hide items on the canvas that are not part of a view. icon to hide items on the canvas that are not part of a view.
\li In the \uicontrol States view, click the empty slot to create a \li In \uicontrol States, click the empty slot to create a
new state and give it a name. For example, \c Normal. new state and give it a name. For example, \c Normal.
\li In the \uicontrol Properties view (2), deselect the \li In \uicontrol Properties (2), deselect the \uicontrol Visibility
\uicontrol Visibility check box or set \uicontrol Opacity to 0 check box or set \uicontrol Opacity to 0 for each item that is not
for each item that is not needed in this view. If you specify needed in this view. If you specify the setting for the parent item,
the setting for the parent item, all child items inherit it and all child items inherit it and are also hidden.
are also hidden.
\image qmldesigner-screen-design.png "Designing views"
\li Create additional states for each view and set the visibility \li Create additional states for each view and set the visibility
or opacity of the items in the view. or opacity of the items in the view.
\li To determine which view opens when the application starts, use the \li To determine which state is applied when the application starts,
\uicontrol {Text Editor} to set the state of the root item of the select \uicontrol Actions > \uicontrol {Set as Default}.
.qml file, as specified by the following code snippet: \endlist
\qml
Item {
state: "Normal"
}
\endqml
\endlist
\if defined(qtcreator) \if defined(qtcreator)
\include qtquick-states-scxml.qdocinc scxml state machines \include qtquick-states-scxml.qdocinc scxml state machines
@@ -165,7 +162,7 @@
the type of behavior that is required. the type of behavior that is required.
You can drag and drop the following QML types from \uicontrol Library You can drag and drop the following QML types from \uicontrol Library
> \uicontrol {QML Types} > \uicontrol {Qt Quick - Animation} to the > \uicontrol {QML Types} > \uicontrol {Qt Quick - Animation} to
\uicontrol Navigator or \uicontrol {Form Editor}: \uicontrol Navigator or \uicontrol {Form Editor}:
\list \list
@@ -181,10 +178,10 @@
sequential animation to create a step where nothing happens, for sequential animation to create a step where nothing happens, for
a specified duration. a specified duration.
\li \l [QML] {PropertyAction}{Property Action} immediately changes \li \l [QML] {PropertyAction}{Property Action} immediately changes
a propertyvalue during an animation, without animating the property a property value during an animation, without animating the
change. property change.
\li \l [QML] {PropertyAnimation}{Property Animation} animates \li \l [QML] {PropertyAnimation}{Property Animation} animates
changes in thevalue of a property. changes in the value of a property.
\li \l [QML] {ScriptAction}{Script Action} defines scripts to be \li \l [QML] {ScriptAction}{Script Action} defines scripts to be
run during an animation. run during an animation.
\li \l [QML] {SequentialAnimation}{Sequential Animation} enables \li \l [QML] {SequentialAnimation}{Sequential Animation} enables

View File

@@ -110,10 +110,6 @@ qhp.qtdesignstudio.subprojects.manual.type = manual
# Doxygen compatibility commands # Doxygen compatibility commands
macro.see = "\\sa" macro.see = "\\sa"
macro.function = "\\fn" macro.function = "\\fn"
macro.QB = "Qt Bridge"
macro.QBPS = "Qt Bridge for Adobe Photoshop"
macro.QBSK = "Qt Bridge for Sketch"
macro.QDS = "Qt Design Studio"
navigation.landingpage = "$IDE_DISPLAY_NAME Manual" navigation.landingpage = "$IDE_DISPLAY_NAME Manual"
buildversion = "$IDE_DISPLAY_NAME Manual $QTC_VERSION" buildversion = "$IDE_DISPLAY_NAME Manual $QTC_VERSION"

View File

@@ -32,7 +32,6 @@
\brief Illustrates how to use the timeline and states to animate UI \brief Illustrates how to use the timeline and states to animate UI
components. components.
\previouspage {Log In UI - Part 3} \previouspage {Log In UI - Part 3}
\nextpage {Log In UI - Part 5}
\image loginui4.gif "Log In UI" \image loginui4.gif "Log In UI"

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -220,4 +220,24 @@
\uicontrol {Export format options} field. You can remove metadata \uicontrol {Export format options} field. You can remove metadata
from PNG files, export assets as progressive JPG or compact SVG, from PNG files, export assets as progressive JPG or compact SVG,
and include SVG namespaces in SVG files. and include SVG namespaces in SVG files.
\section1 Exporting Library Symbols
\QBSK can handle symbols used from a local library. Before you use \QBSK to export a document
that contains remote symbols, you must annotate the Sketch document of the local library for
QML export.
For more information about Sketch libraries, see Sketch documentation.
You can either export the complete library with the document or unlink the symbols.
Unlinking the symbols exports the symbols as if the symbols were part of the document as
Group layers.
Exporting the complete library exports all the layers of the library irrespective of their usage
in the document.
To export a library, select \uicontrol Export. \QBSK asks you whether you want to export the
complete library or to unlink the symbols.
\image qt-sketch-bridge-library.png
*/ */

View File

@@ -44,7 +44,7 @@
independently of each other. independently of each other.
\li \l Flipable provides a surface that can be flipped. \li \l Flipable provides a surface that can be flipped.
\li \l Group provides an item with the size property. \li \l Group provides an item with the size property.
\li \l Iso adds a container for an ISO 7000 icon. \li \l {Iso}{Iso Icon} adds a container for an ISO 7000 icon.
\li \l Pie adds a pie slice or a pie with a slice missing from it. \li \l Pie adds a pie slice or a pie with a slice missing from it.
\li \l Rectangle adds a rectangle with corners that you can shape \li \l Rectangle adds a rectangle with corners that you can shape
independently of each other. independently of each other.
@@ -60,7 +60,8 @@
You can use the project wizard to create a starting point for a custom You can use the project wizard to create a starting point for a custom
\l [QtQuickControls2] {Button}, \l [QtQuickControls2] {Pane}, \l [QtQuickControls2] {Button}, \l [QtQuickControls2] {Pane},
\l [QtQuickControls2] {StackView}{Stack View}, or \l [QtQuickControls2] {StackLayout}{Stacked Layout},
\l [QtQuickControls2] {SwipeView}{Swipe View}, or
\l [QtQuickControls2] {Switch}. \l [QtQuickControls2] {Switch}.
\list 1 \list 1
@@ -68,8 +69,8 @@
\uicontrol {Files and Classes} > \uicontrol {Qt Quick Controls}. \uicontrol {Files and Classes} > \uicontrol {Qt Quick Controls}.
\li Select the control to create, and then select \uicontrol Choose. \li Select the control to create, and then select \uicontrol Choose.
\note Components are listed in the \uicontrol {QML Components} \note Components are listed in the \uicontrol {My QML Components}
section of the \uicontrol Library only if the filename begins tab of the \uicontrol Library only if the filename begins
with a capital letter. with a capital letter.
\li Edit component properties in the \uicontrol Properties view. \li Edit component properties in the \uicontrol Properties view.

View File

@@ -46,8 +46,7 @@
You can use wizards to create projects for the desktop or embedded You can use wizards to create projects for the desktop or embedded
Linux and Android devices. In addition, you can add individual QML Linux and Android devices. In addition, you can add individual QML
files, components, font loaders, and JavaScript files to your files, components, and JavaScript files to your projects.
projects.
\li \l{Using Git} \li \l{Using Git}

View File

@@ -1,6 +1,6 @@
/**************************************************************************** /****************************************************************************
** **
** Copyright (C) 2019 The Qt Company Ltd. ** Copyright (C) 2020 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/ ** Contact: https://www.qt.io/licensing/
** **
** This file is part of the Qt Design Studio documentation. ** This file is part of the Qt Design Studio documentation.
@@ -63,15 +63,22 @@
or create them from scratch using the following wizards: or create them from scratch using the following wizards:
\list \list
\li \uicontrol General generates projects that are suitable for all \li \uicontrol {MCU Support Application} creates an application that
target platforms. uses a subset of \l{Qt QML} and \l{Qt Quick Controls} types (as
\omit supported by Qt for MCUs) that you can deploy, run, and debug on
\li \uicontrol Embedded generates projects that work well on embedded MCU boards.
Linux devices. \li \uicontrol {Qt Quick Application - Empty} creates a Qt Quick UI
\endomit project that uses \l{Qt Quick} types and can be run on all target
\li \uicontrol Mobile generates projects that work well on mobile platforms.
devices. \li \uicontrol {Qt Quick 3D Application} creates a Qt Quick UI project
\li \uicontrol Desktop generates projects that work well on the desktop. that uses Qt Quick and \l{Qt Quick 3D} types.
\li \uicontrol {Qt Quick Application - Scroll} and
\uicontrol {Qt Quick Application - Stack} create a Qt Quick
application that uses Qt Quick Controls to implement a scrollable
list or a set of pages with a stack-based navigation model.
\li \uicontrol {Qt Quick Application - Launcher} creates a Qt Quick UI
project that uses Qt Quick types and defines a QML laucher
application.
\endlist \endlist
\section1 Using Project Wizards \section1 Using Project Wizards
@@ -119,10 +126,12 @@
\list \list
\li \uicontrol {Qt Quick Files} \li \uicontrol {Qt Quick Files}
\list \list
\li \uicontrol {Flow Item} and \uicontrol {Flow View} generate
types that you can use to design the application flow.
\li \uicontrol {Qt Quick File} generates a QML type with one \li \uicontrol {Qt Quick File} generates a QML type with one
of the following types as the root item: \l Item, of the following types as the root item: \l Item,
\l Rectangle, \l Image, \l BorderImage, \l Flickable, \l Rectangle, \l Image, \l BorderImage, \l Flickable,
\l Row, \l Column, \l Flow, or \li Grid. \l Row, \l Column, \l Flow, or \l Grid.
\li \uicontrol {Qt Quick UI File} generates a UI form with one \li \uicontrol {Qt Quick UI File} generates a UI form with one
of the above types as the root item. of the above types as the root item.
\li \uicontrol {Qt Quick Views} generates a \l GridView or a \li \uicontrol {Qt Quick Views} generates a \l GridView or a
@@ -141,17 +150,12 @@
\li \l [Qt Quick Controls 2] {SwipeView} enables users to \li \l [Qt Quick Controls 2] {SwipeView} enables users to
navigate pages by swiping sideways. navigate pages by swiping sideways.
\endlist \endlist
\li \uicontrol {QML Files} \li \uicontrol ListModel adds a \l{ListModel}{list model} to the
\list project.
\li \l FontLoader imports custom fonts to the project for
deployment to devices. For more information, see
\l {Using Custom Fonts}.
\li \l ListModel adds a list model to the project.
\endlist
\li \uicontrol {JavaScript File} generates files that you can use to \li \uicontrol {JavaScript File} generates files that you can use to
write the application logic. This is useful for testing the write the application logic. This is useful for testing the
application before the developers implement the application logic application before the developers implement the application logic
in C++, for example. For more information, see in C++, for example. For more information, see
\l {Simulating Application Logic}. \l {Simulating Application Logic}.
\endlist \endlist
*/ */

View File

@@ -94,7 +94,7 @@
\li \l{Editing 3D Scenes} \li \l{Editing 3D Scenes}
\list \list
\li \l{Editing 3D Assets in Design Mode} \li \l{Editing 3D Assets in Design Mode}
\li \l{Working in the 3D Editor} \li \l{Working in 3D Editor}
\li \l{Adding 3D Views} \li \l{Adding 3D Views}
\li \l{Using 3D Components} \li \l{Using 3D Components}
\list \list

View File

@@ -79,7 +79,7 @@
\li \b {\l{Editing 3D Scenes}} \li \b {\l{Editing 3D Scenes}}
\list \list
\li \l{Editing 3D Assets in Design Mode} \li \l{Editing 3D Assets in Design Mode}
\li \l{Working in the 3D Editor} \li \l{Working in 3D Editor}
\li \l{Adding 3D Views} \li \l{Adding 3D Views}
\li \l{Using 3D Components} \li \l{Using 3D Components}
\endlist \endlist

View File

@@ -35,57 +35,41 @@
\title Editing 3D Assets in Design Mode \title Editing 3D Assets in Design Mode
\QDS opens QML files that contain 3D scenes in the Design mode and the \QDS opens QML files that contain 3D scenes in the Design mode and the
scenes in the 3D editor. You can add imported 3D assets scenes in \uicontrol {3D Editor}. You can add imported 3D assets to projects
to projects and edit them to create scenes and states, as well as the and edit them to create scenes and states, as well as the transitions
transitions between them. between them. The other views enable you to select QML types to use in the
scene, specify properties for them, and view them in a tree structure,
as well as to create connections and browse projects and files.
\image studio-editing-3d-scenes.png "3D assets in Design mode" \image studio-editing-3d-scenes.png "3D assets in Design mode"
To edit 3D scenes in the Design mode: To open the following views, select \uicontrol Window > \uicontrol Views:
\list \list
\li \uicontrol {3D Editor} (1) is the working area where you create the \li \uicontrol {3D Editor} (1) is the working area where you create the
scene, position the model, light and camera, as well as move and scene, position the model, light and camera, as well as move and
scale items. scale items. For more information, see \l {Working in 3D Editor}.
\li \uicontrol {3D View} (2) is where you see the scene projected by the \li \uicontrol {Form Editor} (2) is where you see the scene projected by
camera. the camera.
\li The sidebars contain views where you can select QML types to use in \li \uicontrol {Library} (3) displays the building blocks that you
the scene, specify properties for them, and view them in a tree can use to create scenes: predefined Qt Quick 3D Components,
structure, as well as to create connections and browse projects and Qt Quick Controls, your own 3D assets that you import to the
files. You can select the content of the sidebars in the sidebar project, and other assets. For more information, see \l {Adding 3D
menu: Views}.
\list \li \uicontrol {Navigator} (4) displays the items in the current QML
\li \uicontrol {Library} (3) displays the building blocks that you file as a tree structure. For more information, see
can use to create scenes: predefined Qt Quick 3D Components, \l {Managing Item Hierarchy}.
Qt Quick Controls, your own 3D assets that you import to the \li \uicontrol {Properties} (5) organizes the properties of the
project, and other assets. For more information, see selected item. You can change the properties also in the
\l {Adding 3D Views}. \uicontrol {Text Editor}. For more information, see
\li \uicontrol {Navigator} (4) displays the items in the current QML \l {Specifying Item Properties}.
file as a tree structure. For more information, see \li \uicontrol Connections (6) enables you to create connections
\l {Managing Item Hierarchy}. between objects, signals, and object properties. For more
\li \uicontrol {Properties} (5) organizes the properties of the information, see \l{Adding Connections}.
selected item. You can change the properties also in the \li \uicontrol Timeline (7) provides a timeline and keyframe based
\uicontrol {Text Editor}. For more information, see
\l {Specifying Item Properties}.
\li \uicontrol Connections enables you to create connections
between objects, signals, and object properties. For more
information, see \l{Adding Connections}.
\li \uicontrol {File System} shows all files in the currently
selected directory. For more information, see
\l{Viewing the File System}.
\li \uicontrol {Open Documents} shows currently open files.
\li \uicontrol {Projects} shows a list of projects open in the
current session. For more information, see
\l{Viewing Project Files}.
\endlist
\li \uicontrol {States} displays the different states of the
item. QML states typically describe user interface configurations,
such as the UI controls, their properties and behavior and the
available actions. For more information, see \l{Adding States}.
\li \uicontrol Timeline (6) provides a timeline and keyframe based
editor that enables you to animate the properties of components. editor that enables you to animate the properties of components.
\endlist \endlist
To close the 3D editor, select \uicontrol 2D in the list on the toolbar (7). For more information on other views, see
To reopen it, select \uicontrol {2D/3D}. \l {Editing QML Files in Design Mode}.
*/ */

View File

@@ -28,75 +28,120 @@
\page studio-3d-editor.html \page studio-3d-editor.html
\nextpage studio-3d-view.html \nextpage studio-3d-view.html
\title Working in the 3D Editor \title Working in 3D Editor
To project a 3D scene to a 2D viewport, it is necessary to view the scene When editing a 3D scene, you view the scene in \uicontrol {3D Editor} by
from a \l{Using Scene Camera}{camera}. Select the \uicontrol {Toggle using the \uicontrol {3D Editor} camera. You can switch between
Perspective/Orthographic Projection} button (1) on the 3D editor toolbar to \e {perspective camera} and \e {orthographic camera} modes. When using the
switch between a \e {perspective camera} and an \e {orthographic camera}. perspective camera mode, objects that are far from the camera appear smaller
A perspective camera uses field of view and near and far clip planes to than those nearby. In the orthographic camera mode, all objects appear at
specify the projection, whereas an orthographic camera can be thought of the same scale irrespective of their distance from the camera. Both of them
as a 2D camera. Both of them are free-form cameras that you can use to are free-form camera modes that you can use to orbit around the scene.
orbit around the scene.
When you import 3D scenes from files that you exported from 3D graphics When you import 3D scenes from files that you exported from 3D graphics
tools, you also import the camera, light, model, and materials. If your tools, you also import a \l{Using Scene Camera}{scene camera},
scene did not contain them, you can add the corresponding Qt Quick 3D \l{Using Lights}{light}, \l{Adding Models}{model}, and
types from the \uicontrol Library. \l {Using Materials and Shaders}{materials}. If your scene did not contain
them, you can add the corresponding Qt Quick 3D types from \uicontrol
Library.
You can use the toolbar buttons (2) to show the \e transformation You can use the toolbar buttons to \e transform 3D objects and manipulate
gizmo in the \uicontrol {3D Editor} when an item is selected the 3D scene. Transformation refers to moving, rotating, or scaling of an
and to determine what happens when you drag the selected item. object. The \e pivot of the component is used as the origin for
Transformation refers to moving, rotating, or scaling of an object. transformations. You can set a \l{Setting Transform Properties}{local pivot
Select the \uicontrol {Toggle Local/Global Orientation} button (3) to offset} for an item in \uicontrol Properties to transform the component
determine whether the gizmos affect only the local transformations of the around a point other than its local origin. A line is drawn in \uicontrol
item or whether they transform with respect to the global space. {3D Editor} from the pivot point to the center of the component to provide
a visual connection between them.
Toggle between local and global orientation to determine whether the gizmos
affect only the local transformations of the item or whether they transform
with respect to the global space.
Additional helpful features when editing 3D scenes are the \e {edit light},
which is a quick way to light the scene, and the grid that helps you to
navigate in 3D space. Select the \inlineimage grid_on.png
(\uicontrol {Toggle Grid Visibility}) to show or hide the grid.
\image studio-3d-editor.png "3D Editor" \image studio-3d-editor.png "3D Editor"
The \e pivot of the component is used as the origin for position, scale, \section1 Controlling the 3D Editor Camera
and rotation operations. You can set a \l{Setting Transform Properties}
{local pivot offset} for an item in the \uicontrol Properties view to
manipulate the component around a point other than its local origin. A
line is drawn in the 3D editor from the pivot point to the center of the
component to provide a visual connection between them.
\section1 Controlling the Edit View Camera To switch to perspective camera mode, select
\inlineimage perspective_camera.png
(\uicontrol {Toggle Perspective/Orthographic Edit Camera}).
To switch to orthographic camera mode, select
\inlineimage orthographic_camera.png
.
You can add 3D camera types to the scene to project the view you see in You can navigate the scene by panning, rotating, and zooming the 3D Editor
the View3D type in the application. While editing scenes, you can use camera:
a separate \e {edit view camera} (4) to project the scene to the 3D edit
view in the Design mode.
You can navigate the scene by rotating, panning, and zooming the edit view \list
camera. \li To pan, press \key Alt and use the middle mouse button to click
anywhere in the rendered view to slide the view around.
\li To orbit, press \key Alt and click anywhere in the rendered view to
rotate the view.
\li To zoom, use the mouse wheel or press \key Alt and right-click
anywhere in the rendered view to zoom the view in or out as you drag
up or down.
\endlist
To zoom, use the mouse wheel or press \key Alt and right-click anywhere in To zoom and focus the 3D Editor camera on a selected item,
the rendered view to zoom the view in or out as you drag up or down. select \inlineimage fit_selected.png
(\uicontrol {Fit Selected}) or press \key F.
To pan, press \key Alt and use the middle mouse button to click anywhere in The world axis helper (1) shows the direction of the world axes in respect
the rendered view to slide the view around. to the 3D Editor camera. To point the camera at the currently selected
To orbit, press \key Alt and click anywhere in the rendered view to rotate
the view.
To scale the edit view camera and to focus it on the selected items, select
\uicontrol {Fit Selected} button or press \key F.
The world axis helper (5) shows the direction of the world axes in respect
to the edit view camera. To point the camera at the currently selected
component in the direction of an axis, click the axis. If no component component in the direction of an axis, click the axis. If no component
is selected, the camera is pointed at the world origin. This does not is selected, the camera is pointed at the world origin. This does not
affect the camera zoom level. affect the camera zoom level.
For more information about using the cameras in the scene, the available \image studio-3d-editor-axis-helper.png "Axis helper in 3D Editor"
3D camera types, and their properties, see \l{Using Scene Camera}.
You can use scene cameras (2) to view the the View3D type from a specific
angle in \uicontrol {Form Editor} while editing scenes. Different types of
cameras are available in \uicontrol Library under \uicontrol
{Qt Quick 3D}. For more information about using cameras in the scene,
the available camera types, and their properties, see
\l{Using Scene Camera}.
\section1 Using Global and Local Orientation
To switch between local and global orientation, select
\inlineimage local.png
or \inlineimage global.png
(\uicontrol {Toggle Local/Global Orientation})
or press \key Y.
In global orientation mode, transformation of a selected object is presented
with respect to the global space. For example, while the move tool is
selected, selecting a cube will show its move gizmo aligned with the axes
of global space. Dragging on the red arrow of the gizmo moves the object in
the global x direction.
In local orientation mode, the position of a selected object is shown
according to local axes specific to the selected object. For example,
selecting a rotated cube will show its axes rotated, and not aligned with
the axes of global space. Dragging on the red arrow of the gizmo
moves the object in the local x direction in relation to the object.
\section1 Using Edit Light
The edit light is an extra point light that follows the edit camera.
To switch the edit light on and off, select \inlineimage edit_light_on.png
or \inlineimage edit_light_off.png
(\uicontrol {Toggle Edit Light})
or press \key U.
For more information about the available scene light types and their
properties, see \l{Using Lights}.
\section1 Selecting Items \section1 Selecting Items
To move, rotate, or scale items in the scene, you need to select them first. To move, rotate, or scale items in the scene, you need to select them first.
The selection mode buttons determine how items are selected when you click The selection mode buttons determine how items are selected when you click
them in the 3D editor. them in \uicontrol {3D Editor}:
\list \list
\li In the \inlineimage select_item.png \li In the \inlineimage select_item.png
@@ -111,80 +156,54 @@
\section1 Moving Items \section1 Moving Items
\image studio-3d-editor-move.png "3D editor in move mode" \image studio-3d-editor-move.png "3D Editor in move mode"
You can move items in relation to their coordinate system, along the x, y, You can move items in relation to their coordinate system, along the x, y,
or z view axis or on the top, bottom, left, and right clip planes of the or z axis or on the top, bottom, left, and right clip planes of the
render camera. \uicontrol {3D Editor} camera.
To move items, select \inlineimage move_on.png To move items, select \inlineimage move_on.png
or press \key W. or press \key W:
To move items along an axis, click the axis and drag the item along the \list
axis. \li To move items along the axes of the move gizmo, click the axis and
drag the item along the axis.
To move items on a plane, select the plane handle and drag the item on \li To move items on a plane, click the plane handle and drag the item
the plane. on the plane.
\li To move an item freely in the editor, click the gray handle at the
To move an item freely in the editor, select the handle at the center of center of the item.
the item. \endlist
\section1 Rotating Items \section1 Rotating Items
You can rotate items around the view axes of the camera. \image studio-3d-editor-rotate.png "3D Editor in rotate mode"
\image studio-3d-editor-rotate.png "3D editor in rotate mode"
To rotate items, select \inlineimage rotate_on.png To rotate items, select \inlineimage rotate_on.png
or press \key E. or press \key E:
To rotate an item around an axis, select the axis and drag in the direction \list
you want to rotate the item in. \li To rotate an item around its rotation gizmo, click the axis and
drag in the direction you want to rotate the item in.
To freely rotate the item, select the gray circle. \li To freely rotate the item, select the gray circle.
\endlist
\section1 Using Global and Local Orientation
To switch between global and local orientation, select \uicontrol
{Toggle Local/Global Orientation}.
In global orientation mode, transformation of a selected object is presented
with respect to the global space. For example, while the move tool is
selected, selecting a cube will show its move gizmo aligned with the axes
of global space. Dragging on the red arrow of the gizmo moves the object in
the global x direction.
In local orientation mode, the position of a selected object is shown
according to local axes specific to the selected object. For example,
selecting a rotated cube will show its axes rotated, and not aligned with
the axes of global space. Dragging on the red arrow of the gizmo
moves the object in the local x direction in relation to the object.
\section1 Scaling Items \section1 Scaling Items
\image studio-3d-editor-scale.png "3D editor in scale mode" \image studio-3d-editor-scale.png "3D Editor in scale mode"
To scale items, select \inlineimage scale_on.png
or press \key R.
You can use the scale handles to adjust the local x, y, or z scale of an You can use the scale handles to adjust the local x, y, or z scale of an
item. You can adjust the scale across one, two, or three axes, depending item. You can adjust the scale across one, two, or three axes, depending on
on the handle. the handle.
To adjust the scale across one axis, select the scale handle attached to To scale items, select \inlineimage scale_on.png
the axis. To uniformly scale an item across all axes, select the handle or press \key R:
at the center of the item.
To adjust the scale across a plane, select the plane handle and drag the \list
item on the plane. \li To adjust the scale across one axis, click and drag the scale handle
attached to the axis.
\section1 Using Edit View Light \li To adjust the scale across a plane, click the plane handle and drag
the item on the plane.
You use 3D light types to light the models in the scene. While editing \li To uniformly scale an item across all axes, click and drag the
scenes, you can use a separate \e {edit view light} to illuminate the handle at the center of the item.
portions of the scene that the scene lights do not hit. To switch the edit \endlist
view light on and off, select the \uicontrol {Toggle Edit Light} button (6).
For more information about the available scene light types and their
properties, see \l{Using Lights}.
*/ */

View File

@@ -80,14 +80,13 @@
To clear the background using a color, select \uicontrol Color, To clear the background using a color, select \uicontrol Color,
and select the color in the \uicontrol {Clear Color} field. and select the color in the \uicontrol {Clear Color} field.
To render a Skybox or Skydome instead of clearing the scene,
select \uicontrol SkyBox. You can specify the image to use as
a value of the \l{SceneEnvironment::lightProbe}{lightProbe}
property in \uicontrol {Text Editor}.
To leave the scene uncleared, select \uicontrol {Unspecified}. To leave the scene uncleared, select \uicontrol {Unspecified}.
\section1 Blending Scene Colors
To determine how colors are blended, select a blend mode in the
\uicontrol {Blend mode} field. For more information on the options,
see \uicontrol {Blending Colors}.
\section1 Performing Depth Tests \section1 Performing Depth Tests
You can perform depth tests to optimize the scene environment. To skip depth You can perform depth tests to optimize the scene environment. To skip depth

View File

@@ -30,32 +30,34 @@
\title Adding 3D Views \title Adding 3D Views
To display \l {Qt Quick 3D} types in the \uicontrol Library, select You can use a wizard to create a Qt Quick 3D UI project that imports
\uicontrol Library > \uicontrol {QML Imports} > \uicontrol {Add Import} > the \l{Qt Quick 3D} QML types to the \uicontrol {QML Types} tab in
\uicontrol QtQuick3D. The types are displayed in the \uicontrol {QML Types} \uicontrol Library and contains a 3D view, scene light, camera, and
tab. model. A default material is attached to the model. You can attach
textures to materials. For more information about creating projects,
see \l{Creating Projects}.
To add a 3D view to some other kind of project and to display the Qt Quick
3D QML types in \uicontrol Library, select \uicontrol Library >
\uicontrol {QML Imports} > \uicontrol {Add Import} > \uicontrol QtQuick3D.
\image studio-qtquick-3d-components.png \image studio-qtquick-3d-components.png
To add a 3D view to the scene, drag and drop a \uicontrol {View 3D} To add components to the scene, drag and drop them to \uicontrol Navigator
component from \uicontrol Library > \uicontrol {QML Types} > or \uicontrol {Form Editor}.
\uicontrol {Qt Quick 3D} to the 3D editor or to the \uicontrol Navigator.
A 3D view contains a reference node that specifies a scene light, camera,
and model. A default material is attached to the model. You can attach
textures to materials.
\image studio-navigator-view3d.png "View 3D component in the Navigator" \image studio-navigator-view3d.png "View 3D component in the Navigator"
By default, a directional light and a perspective camera are used. By default, a directional light and a perspective camera are used.
To use other light and camera types, change the type of the component in To use other light and camera types, change the type of the component
the \uicontrol Type field in the \uicontrol Properties view. For example, in the \uicontrol Type field in \uicontrol Properties. For example,
to use a point light, enter \e {PointLight}. to use a point light, enter \e {PointLight}.
\image studio-3d-properties-type.png "Type field in Properties view" \image studio-3d-properties-type.png "Type field in Properties view"
To edit component properties, select the component in the 3D editor To edit component properties, select the component in
or in the \uicontrol Navigator and modify the property values in the \uicontrol {Form Editor} or \uicontrol Navigator and
\uicontrol Properties view. modify the property values in \uicontrol Properties.
\image studio-qtquick-3d-view.png "View 3D component properties" \image studio-qtquick-3d-view.png "View 3D component properties"

View File

@@ -68,7 +68,7 @@
\QDS opens QML files that contain 3D scenes in the Design mode and \QDS opens QML files that contain 3D scenes in the Design mode and
the scenes in the 3D editor. You can add imported 3D assets the scenes in the 3D editor. You can add imported 3D assets
to projects as 3D components. to projects as 3D components.
\li \l {Working in the 3D Editor} \li \l {Working in 3D Editor}
You can select 3D components in the 3D editor to move, rotate, and You can select 3D components in the 3D editor to move, rotate, and
scale them in the scene projected by the camera. scale them in the scene projected by the camera.

View File

@@ -87,6 +87,8 @@ def get_arguments():
action='store_true', default=False) action='store_true', default=False)
parser.add_argument('--no-zip', help='Skip creation of 7zip files for install and developer package', parser.add_argument('--no-zip', help='Skip creation of 7zip files for install and developer package',
action='store_true', default=False) action='store_true', default=False)
parser.add_argument('--add-make-arg', help='Passes the argument to the make tool.',
action='append', dest='make_args', default=[])
return parser.parse_args() return parser.parse_args()
def build_qtcreator(args, paths): def build_qtcreator(args, paths):
@@ -137,7 +139,10 @@ def build_qtcreator(args, paths):
'-DIDE_REVISION_URL=https://code.qt.io/cgit/qt-creator/qt-creator.git/log/?id=' + ide_revision] '-DIDE_REVISION_URL=https://code.qt.io/cgit/qt-creator/qt-creator.git/log/?id=' + ide_revision]
common.check_print_call(cmake_args + [paths.src], paths.build) common.check_print_call(cmake_args + [paths.src], paths.build)
common.check_print_call(['cmake', '--build', '.'], paths.build) build_args = ['cmake', '--build', '.']
if args.make_args:
build_args += ['--'] + args.make_args
common.check_print_call(build_args, paths.build)
if not args.no_docs: if not args.no_docs:
common.check_print_call(['cmake', '--build', '.', '--target', 'docs'], paths.build) common.check_print_call(['cmake', '--build', '.', '--target', 'docs'], paths.build)

View File

@@ -1089,6 +1089,10 @@ class DumperBase():
return '_ZN%sE' % ''.join(map(lambda x: '%d%s' % (len(x), x), return '_ZN%sE' % ''.join(map(lambda x: '%d%s' % (len(x), x),
typeName.split('::'))) typeName.split('::')))
def arrayItemCountFromTypeName(self, typeName, fallbackMax=1):
itemCount = typeName[typeName.find('[') + 1:typeName.find(']')]
return int(itemCount) if itemCount else fallbackMax
def putCStyleArray(self, value): def putCStyleArray(self, value):
arrayType = value.type.unqualified() arrayType = value.type.unqualified()
innerType = arrayType.ltarget innerType = arrayType.ltarget
@@ -1107,10 +1111,7 @@ class DumperBase():
# This should not happen. But it does, see QTCREATORBUG-14755. # This should not happen. But it does, see QTCREATORBUG-14755.
# GDB/GCC produce sizeof == 0 for QProcess arr[3] # GDB/GCC produce sizeof == 0 for QProcess arr[3]
# And in the Nim string dumper. # And in the Nim string dumper.
s = value.type.name itemCount = self.arrayItemCountFromTypeName(value.type.name, 100)
itemCount = s[s.find('[') + 1:s.find(']')]
if not itemCount:
itemCount = '100'
arrayByteSize = int(itemCount) * innerType.size() arrayByteSize = int(itemCount) * innerType.size()
n = arrayByteSize // innerType.size() n = arrayByteSize // innerType.size()

View File

@@ -341,7 +341,12 @@ class Dumper(DumperBase):
#DumperBase.warn('ARRAY') #DumperBase.warn('ARRAY')
nativeTargetType = nativeType.target().unqualified() nativeTargetType = nativeType.target().unqualified()
targetType = self.fromNativeType(nativeTargetType) targetType = self.fromNativeType(nativeTargetType)
count = nativeType.sizeof // nativeTargetType.sizeof if nativeType.sizeof == 0:
# QTCREATORBUG-23998, note that nativeType.name == None here,
# whereas str(nativeType) returns sth like 'QObject [5]'
count = self.arrayItemCountFromTypeName(str(nativeType), 1)
else:
count = nativeType.sizeof // nativeTargetType.sizeof
return self.createArrayType(targetType, count) return self.createArrayType(targetType, count)
if code == gdb.TYPE_CODE_TYPEDEF: if code == gdb.TYPE_CODE_TYPEDEF:

View File

@@ -118,7 +118,7 @@ public:
LanguageClientValue(const T &value) : Utils::variant<T, std::nullptr_t>(value) { } LanguageClientValue(const T &value) : Utils::variant<T, std::nullptr_t>(value) { }
LanguageClientValue(const QJsonValue &value) LanguageClientValue(const QJsonValue &value)
{ {
if (QTC_GUARD(value.isUndefined()) || value.isNull()) if (!QTC_GUARD(!value.isUndefined()) || value.isNull())
*this = nullptr; *this = nullptr;
else else
*this = fromJsonValue<T>(value); *this = fromJsonValue<T>(value);

View File

@@ -696,9 +696,12 @@ void ClangTool::startTool(ClangTool::FileSelection fileSelection,
connect(m_runWorker, &ClangToolRunWorker::buildFailed,this, &ClangTool::onBuildFailed); connect(m_runWorker, &ClangToolRunWorker::buildFailed,this, &ClangTool::onBuildFailed);
connect(m_runWorker, &ClangToolRunWorker::startFailed, this, &ClangTool::onStartFailed); connect(m_runWorker, &ClangToolRunWorker::startFailed, this, &ClangTool::onStartFailed);
connect(m_runWorker, &ClangToolRunWorker::started, this, &ClangTool::onStarted); connect(m_runWorker, &ClangToolRunWorker::started, this, &ClangTool::onStarted);
connect(m_runWorker, &ClangToolRunWorker::runnerFinished, connect(m_runWorker, &ClangToolRunWorker::runnerFinished, this, [this]() {
this, &ClangTool::updateForCurrentState); m_filesCount = m_runWorker->totalFilesToAnalyze();
connect(m_runControl, &RunControl::destroyed, [this](){ m_runWorker = nullptr; }); m_filesSucceeded = m_runWorker->filesAnalyzed();
m_filesFailed = m_runWorker->filesNotAnalyzed();
updateForCurrentState();
});
// More init and UI update // More init and UI update
m_diagnosticFilterModel->setProject(project); m_diagnosticFilterModel->setProject(project);
@@ -857,6 +860,10 @@ void ClangTool::reset()
m_state = State::Initial; m_state = State::Initial;
m_runControl = nullptr; m_runControl = nullptr;
m_runWorker = nullptr; m_runWorker = nullptr;
m_filesCount = 0;
m_filesSucceeded = 0;
m_filesFailed = 0;
} }
static bool canAnalyzeProject(Project *project) static bool canAnalyzeProject(Project *project)
@@ -1039,8 +1046,6 @@ void ClangTool::onRunControlStopped()
void ClangTool::update() void ClangTool::update()
{ {
updateForInitialState(); updateForInitialState();
if (!m_runWorker)
return;
updateForCurrentState(); updateForCurrentState();
} }
@@ -1162,9 +1167,9 @@ void ClangTool::updateForCurrentState()
// Info bar: errors // Info bar: errors
const bool hasErrorText = !m_infoBarWidget->errorText().isEmpty(); const bool hasErrorText = !m_infoBarWidget->errorText().isEmpty();
const bool hasErrors = m_runWorker && m_runWorker->filesNotAnalyzed() > 0; const bool hasErrors = m_filesFailed > 0;
if (hasErrors && !hasErrorText) { if (hasErrors && !hasErrorText) {
const QString text = makeLink( tr("Failed to analyze %1 files.").arg(m_runWorker->filesNotAnalyzed())); const QString text = makeLink( tr("Failed to analyze %1 files.").arg(m_filesFailed));
m_infoBarWidget->setError(InfoBarWidget::Warning, text, [this]() { showOutputPane(); }); m_infoBarWidget->setError(InfoBarWidget::Warning, text, [this]() { showOutputPane(); });
} }
@@ -1177,12 +1182,12 @@ void ClangTool::updateForCurrentState()
break; break;
case State::AnalyzerRunning: case State::AnalyzerRunning:
showProgressIcon = true; showProgressIcon = true;
if (m_runWorker->totalFilesToAnalyze() == 0) { if (m_filesCount == 0) {
infoText = tr("Analyzing..."); // Not yet fully started/initialized infoText = tr("Analyzing..."); // Not yet fully started/initialized
} else { } else {
infoText = tr("Analyzing... %1 of %2 files processed.") infoText = tr("Analyzing... %1 of %2 files processed.")
.arg(m_runWorker->filesAnalyzed() + m_runWorker->filesNotAnalyzed()) .arg(m_filesSucceeded + m_filesFailed)
.arg(m_runWorker->totalFilesToAnalyze()); .arg(m_filesCount);
} }
break; break;
case State::PreparationStarted: case State::PreparationStarted:
@@ -1195,7 +1200,7 @@ void ClangTool::updateForCurrentState()
infoText = tr("Analysis stopped by user."); infoText = tr("Analysis stopped by user.");
break; break;
case State::AnalyzerFinished: case State::AnalyzerFinished:
infoText = tr("Finished processing %1 files.").arg(m_runWorker->totalFilesToAnalyze()); infoText = tr("Finished processing %1 files.").arg(m_filesCount);
break; break;
case State::ImportFinished: case State::ImportFinished:
infoText = tr("Diagnostics imported."); infoText = tr("Diagnostics imported.");
@@ -1208,7 +1213,7 @@ void ClangTool::updateForCurrentState()
// Info bar: diagnostic stats // Info bar: diagnostic stats
QString diagText; QString diagText;
if (issuesFound) { if (issuesFound) {
diagText = tr("%1 diagnostics. %2 fixits, %4 selected.") diagText = tr("%1 diagnostics. %2 fixits, %3 selected.")
.arg(issuesVisible) .arg(issuesVisible)
.arg(m_diagnosticFilterModel->fixitsScheduable()) .arg(m_diagnosticFilterModel->fixitsScheduable())
.arg(m_diagnosticFilterModel->fixitsScheduled()); .arg(m_diagnosticFilterModel->fixitsScheduled());

View File

@@ -162,6 +162,9 @@ private:
QAction *m_stopAction = nullptr; QAction *m_stopAction = nullptr;
State m_state = State::Initial; State m_state = State::Initial;
int m_filesCount = 0;
int m_filesSucceeded = 0;
int m_filesFailed = 0;
DiagnosticFilterModel *m_diagnosticFilterModel = nullptr; DiagnosticFilterModel *m_diagnosticFilterModel = nullptr;

View File

@@ -61,7 +61,7 @@
namespace McuSupport { namespace McuSupport {
namespace Internal { namespace Internal {
static const int KIT_VERSION = 3; // Bumps up whenever details in Kit creation change static const int KIT_VERSION = 4; // Bumps up whenever details in Kit creation change
static QString packagePathFromSettings(const QString &settingsKey, const QString &defaultPath = {}) static QString packagePathFromSettings(const QString &settingsKey, const QString &defaultPath = {})
{ {
@@ -441,14 +441,14 @@ void McuSupportOptions::deletePackagesAndTargets()
const QVersionNumber &McuSupportOptions::supportedQulVersion() const QVersionNumber &McuSupportOptions::supportedQulVersion()
{ {
static const QVersionNumber v({1, 1, 0}); static const QVersionNumber v({1, 1});
return v; return v;
} }
void McuSupportOptions::setQulDir(const Utils::FilePath &dir) void McuSupportOptions::setQulDir(const Utils::FilePath &dir)
{ {
deletePackagesAndTargets(); deletePackagesAndTargets();
Sdk::hardcodedTargetsAndPackages(dir, &packages, &mcuTargets); Sdk::targetsAndPackages(dir, &packages, &mcuTargets);
//packages.append(qtForMCUsSdkPackage); //packages.append(qtForMCUsSdkPackage);
for (auto package : packages) { for (auto package : packages) {
connect(package, &McuPackage::changed, [this](){ connect(package, &McuPackage::changed, [this](){

View File

@@ -27,10 +27,17 @@
#include "mcusupportoptions.h" #include "mcusupportoptions.h"
#include "mcusupportsdk.h" #include "mcusupportsdk.h"
#include <utils/algorithm.h>
#include <utils/hostosinfo.h> #include <utils/hostosinfo.h>
#include <utils/fileutils.h> #include <utils/fileutils.h>
#include <QDir> #include <QDir>
#include <QDirIterator>
#include <QHash>
#include <QJsonArray>
#include <QJsonDocument>
#include <QJsonObject>
#include <QVariant>
namespace McuSupport { namespace McuSupport {
namespace Internal { namespace Internal {
@@ -220,9 +227,9 @@ static McuPackage *createMcuXpressoIdePackage()
return result; return result;
} }
static McuPackage *createFreeRTOSSourcesPackage(const QString &envVarPrefix) static McuPackage *createFreeRTOSSourcesPackage(const QString &envVar)
{ {
const QString envVar = envVarPrefix + "_FREERTOS_DIR"; const QString envVarPrefix = envVar.chopped(strlen("_FREERTOS_DIR"));
const QString defaultPath = const QString defaultPath =
qEnvironmentVariableIsSet(envVar.toLatin1()) ? qEnvironmentVariableIsSet(envVar.toLatin1()) ?
@@ -238,98 +245,147 @@ static McuPackage *createFreeRTOSSourcesPackage(const QString &envVarPrefix)
return result; return result;
} }
void hardcodedTargetsAndPackages(const Utils::FilePath &dir, QVector<McuPackage *> *packages, struct McuTargetDescription
QVector<McuTarget *> *mcuTargets)
{ {
McuToolChainPackage* armGccPackage = Sdk::createArmGccPackage(); QString qulVersion;
McuToolChainPackage *ghsToolchainPackage = createGhsToolchainPackage(); QString platform;
McuToolChainPackage* desktopToolChainPackage = createDesktopToolChainPackage(); QString platformVendor;
McuPackage* stm32CubeFwF7SdkPackage = Sdk::createStm32CubeFwF7SdkPackage(); QVector<int> colorDepths;
McuPackage* stm32CubeProgrammerPackage = Sdk::createStm32CubeProgrammerPackage(); QString toolchainId;
McuPackage* evkbImxrt1050SdkPackage = Sdk::createEvkbImxrt1050SdkPackage(); QString boardSdkEnvVar;
McuPackage *mcuXpressoIdePackage = createMcuXpressoIdePackage(); QString freeRTOSEnvVar;
McuPackage *rglPackage = createRGLPackage(); };
McuPackage *freeRTOSSTM32F7Package = createFreeRTOSSourcesPackage("STM32F7");
McuPackage *freeRTOSIMXRT1050Package = createFreeRTOSSourcesPackage("IMXRT1050");
McuPackage *freeRTOSIMXRT1064Package = createFreeRTOSSourcesPackage("IMXRT1064");
QVector<McuPackage*> stmEvalPackages = { static QVector<McuTarget *> targetsFromDescriptions(const QList<McuTargetDescription> &descriptions,
armGccPackage, stm32CubeProgrammerPackage}; QVector<McuPackage *> *packages)
QVector<McuPackage*> nxpEvalPackages = { {
armGccPackage, mcuXpressoIdePackage}; const QHash<QString, McuToolChainPackage *> tcPkgs = {
QVector<McuPackage*> renesasEvalPackages = { {{"armgcc"}, createArmGccPackage()},
ghsToolchainPackage, rglPackage}; {{"greenhills"}, createGhsToolchainPackage()},
QVector<McuPackage*> desktopPackages = {}; {{"desktop"}, createDesktopToolChainPackage()},
*packages = {
armGccPackage, desktopToolChainPackage, ghsToolchainPackage,
stm32CubeFwF7SdkPackage, stm32CubeProgrammerPackage, evkbImxrt1050SdkPackage,
mcuXpressoIdePackage, rglPackage,
freeRTOSSTM32F7Package, freeRTOSIMXRT1050Package, freeRTOSIMXRT1064Package};
const QString vendorStm = "STM";
const QString vendorNxp = "NXP";
const QString vendorQt = "Qt";
const QString vendorRenesas = "Renesas";
const struct {
const QString &vendor;
const QString qulPlatform;
const QVector<McuPackage*> &packages;
McuToolChainPackage *toolchainPackage;
McuPackage *freeRTOSPackage;
const QVector<int> colorDepths;
} targets[] = {
{vendorNxp, {"MIMXRT1050-EVK"}, nxpEvalPackages, armGccPackage,
freeRTOSIMXRT1050Package, {16}},
{vendorNxp, {"MIMXRT1064-EVK"}, nxpEvalPackages, armGccPackage,
freeRTOSIMXRT1064Package, {16}},
{vendorQt, {"Qt"}, desktopPackages, desktopToolChainPackage,
nullptr, {32}},
{vendorRenesas, {"RH850-D1M1A"}, renesasEvalPackages, ghsToolchainPackage,
nullptr, {32}},
{vendorStm, {"STM32F469I-DISCOVERY"}, stmEvalPackages, armGccPackage,
nullptr, {24}},
{vendorStm, {"STM32F7508-DISCOVERY"}, stmEvalPackages, armGccPackage,
freeRTOSSTM32F7Package, {32, 16}},
{vendorStm, {"STM32F769I-DISCOVERY"}, stmEvalPackages, armGccPackage,
freeRTOSSTM32F7Package, {32}},
{vendorStm, {"STM32H750B-DISCOVERY"}, stmEvalPackages, armGccPackage,
nullptr, {32}},
{vendorStm, {"STM32L4R9I-DISCOVERY"}, stmEvalPackages, armGccPackage,
nullptr, {24}},
{vendorStm, {"STM32L4R9I-EVAL"}, stmEvalPackages, armGccPackage,
nullptr, {24}}
}; };
const QString QulTargetTemplate = const QHash<QString, McuPackage *> vendorPkgs = {
dir.toString() + "/lib/cmake/Qul/QulTargets/QulTargets_%1_%2.cmake"; {{"ST"}, createStm32CubeProgrammerPackage()},
for (const auto target : targets) { {{"NXP"}, createMcuXpressoIdePackage()},
for (auto os : {McuTarget::OS::Desktop, McuTarget::OS::BareMetal, {{"Renesas"}, createRGLPackage()}
McuTarget::OS::FreeRTOS}) { };
for (int colorDepth : target.colorDepths) {
QVector<McuPackage*> required3rdPartyPackages = target.packages; QHash<QString, McuPackage *> freeRTOSPkgs;
QVector<McuTarget *> mcuTargets;
for (auto desc : descriptions) {
McuToolChainPackage *tcPkg = tcPkgs.value(desc.toolchainId);
if (desc.toolchainId == "desktop") {
auto mcuTarget = new McuTarget(desc.platformVendor, desc.platform,
McuTarget::OS::Desktop, {}, tcPkg);
mcuTargets.append(mcuTarget);
continue;
}
for (auto os : {McuTarget::OS::BareMetal, McuTarget::OS::FreeRTOS}) {
for (int colorDepth : desc.colorDepths) {
QVector<McuPackage*> required3rdPartyPkgs = {
vendorPkgs.value(desc.platformVendor), tcPkg
};
if (os == McuTarget::OS::FreeRTOS) { if (os == McuTarget::OS::FreeRTOS) {
if (target.freeRTOSPackage) if (desc.freeRTOSEnvVar.isEmpty()) {
required3rdPartyPackages.append(target.freeRTOSPackage);
else
continue; continue;
} else if (os == McuTarget::OS::Desktop && target.toolchainPackage->type() } else {
!= McuToolChainPackage::TypeDesktop) { if (!freeRTOSPkgs.contains(desc.freeRTOSEnvVar)) {
continue; auto freeRTOSPkg = createFreeRTOSSourcesPackage(desc.freeRTOSEnvVar);
freeRTOSPkgs.insert(desc.freeRTOSEnvVar, freeRTOSPkg);
}
required3rdPartyPkgs.append(freeRTOSPkgs.value(desc.freeRTOSEnvVar));
}
} }
const QString QulTarget = auto mcuTarget = new McuTarget(desc.platformVendor, desc.platform, os,
QulTargetTemplate.arg(target.qulPlatform, QString::number(colorDepth)); required3rdPartyPkgs, tcPkg);
if (!Utils::FilePath::fromUserInput(QulTarget).exists()) if (desc.colorDepths.count() > 1)
continue;
auto mcuTarget = new McuTarget(target.vendor, target.qulPlatform, os,
required3rdPartyPackages, target.toolchainPackage);
if (target.colorDepths.count() > 1)
mcuTarget->setColorDepth(colorDepth); mcuTarget->setColorDepth(colorDepth);
mcuTargets->append(mcuTarget); mcuTargets.append(mcuTarget);
} }
} }
} }
packages->append(Utils::transform<QVector<McuPackage *> >(
tcPkgs.values(), [&](McuToolChainPackage *tcPkg) { return tcPkg; }));
packages->append(vendorPkgs.values().toVector());
packages->append(freeRTOSPkgs.values().toVector());
return mcuTargets;
}
static QFileInfoList targetDescriptionFiles(const Utils::FilePath &dir)
{
// Workaround for UL-2390: Instead of "./kits/", walk through "./lib/cmake/Qul/boards/"
QFileInfoList result;
QDirIterator it(dir.toString() + "/lib/cmake/Qul/boards/", {QLatin1String("*.json")},
QDir::Files, QDirIterator::Subdirectories);
while (it.hasNext())
result.append(it.next());
return result;
}
static QString freeRTOSEnvVarForPlatform(const QString &platform)
{
if (platform == "STM32F769I-DISCOVERY" || platform == "STM32F7508-DISCOVERY")
return {"STM32F7_FREERTOS_DIR"};
else if (platform == "MIMXRT1050-EVK")
return {"IMXRT1050_FREERTOS_DIR"};
else if (platform == "MIMXRT1064-EVK")
return {"IMXRT1064_FREERTOS_DIR"};
return {};
}
static McuTargetDescription parseDescriptionJson(const QByteArray &data)
{
const QJsonDocument document = QJsonDocument::fromJson(data);
const QJsonObject target = document.object();
const QJsonObject toolchain = target.value("toolchain").toObject();
const QJsonObject boardSdk = target.value("boardSdk").toObject();
const QString platform = target.value("platform").toString();
const QVariantList colorDepths = target.value("colorDepths").toArray().toVariantList();
const auto colorDepthsVector = Utils::transform<QVector<int> >(
colorDepths, [&](const QVariant &colorDepth) { return colorDepth.toInt(); });
return {
target.value("qulVersion").toString(),
platform,
target.value("platformVendor").toString(),
colorDepthsVector,
toolchain.value("id").toString(),
boardSdk.value("boardSdkEnvVar").toString(),
freeRTOSEnvVarForPlatform(platform) // Workaround for UL-2514: Missing FreeRTOS information
};
}
void targetsAndPackages(const Utils::FilePath &dir, QVector<McuPackage *> *packages,
QVector<McuTarget *> *mcuTargets)
{
QList<McuTargetDescription> descriptions;
for (const QFileInfo &fileInfo : targetDescriptionFiles(dir)) {
QFile file(fileInfo.absoluteFilePath());
if (!file.open(QFile::ReadOnly))
continue;
const McuTargetDescription desc = parseDescriptionJson(file.readAll());
if (!McuSupportOptions::supportedQulVersion()
.isPrefixOf(QVersionNumber::fromString(desc.qulVersion)))
continue;
descriptions.append(desc);
}
if (!descriptions.isEmpty()) {
// Workaround for missing JSON file for Desktop target:
descriptions.prepend({McuSupportOptions::supportedQulVersion().toString(),
{"Qt"}, {"Qt"}, {32}, {"desktop"}, {}, {}});
mcuTargets->append(targetsFromDescriptions(descriptions, packages));
}
} }
} // namespace Sdk } // namespace Sdk

View File

@@ -27,6 +27,10 @@
#include <QVector> #include <QVector>
namespace Utils {
class FilePath;
}
namespace McuSupport { namespace McuSupport {
namespace Internal { namespace Internal {
class McuPackage; class McuPackage;
@@ -36,9 +40,8 @@ namespace Sdk {
McuPackage *createQtForMCUsPackage(); McuPackage *createQtForMCUsPackage();
// Legacy: List of targets supported by Qt for MCUs 1.0 void targetsAndPackages(const Utils::FilePath &qulDir,
void hardcodedTargetsAndPackages(const Utils::FilePath &qulDir, QVector<McuPackage*> *packages, QVector<McuTarget*> *mcuTargets);
QVector<McuPackage*> *packages, QVector<McuTarget*> *mcuTargets);
} // namespace Sdk } // namespace Sdk
} // namespace Internal } // namespace Internal

View File

@@ -192,6 +192,8 @@ void SessionModel::sort(int column, Qt::SortOrder order)
return isLess; return isLess;
}; };
Utils::sort(m_sortedSessions, cmp); Utils::sort(m_sortedSessions, cmp);
m_currentSortColumn = column;
m_currentSortOrder = order;
endResetModel(); endResetModel();
} }
@@ -237,6 +239,7 @@ void SessionModel::deleteSessions(const QStringList &sessions)
beginResetModel(); beginResetModel();
SessionManager::deleteSessions(sessions); SessionManager::deleteSessions(sessions);
m_sortedSessions = SessionManager::sessions(); m_sortedSessions = SessionManager::sessions();
sort(m_currentSortColumn, m_currentSortOrder);
endResetModel(); endResetModel();
} }
@@ -268,6 +271,7 @@ void SessionModel::runSessionNameInputDialog(SessionNameInputDialog *sessionInpu
createSession(newSession); createSession(newSession);
m_sortedSessions = SessionManager::sessions(); m_sortedSessions = SessionManager::sessions();
endResetModel(); endResetModel();
sort(m_currentSortColumn, m_currentSortOrder);
if (sessionInputDialog->isSwitchToRequested()) if (sessionInputDialog->isSwitchToRequested())
switchToSession(newSession); switchToSession(newSession);

View File

@@ -81,6 +81,8 @@ private:
void runSessionNameInputDialog(ProjectExplorer::Internal::SessionNameInputDialog *sessionInputDialog, std::function<void(const QString &)> createSession); void runSessionNameInputDialog(ProjectExplorer::Internal::SessionNameInputDialog *sessionInputDialog, std::function<void(const QString &)> createSession);
QStringList m_sortedSessions; QStringList m_sortedSessions;
int m_currentSortColumn = 0;
Qt::SortOrder m_currentSortOrder = Qt::AscendingOrder;
}; };
} // namespace Internal } // namespace Internal

View File

@@ -480,7 +480,7 @@ void QbsBuildSystem::updateProjectNodes(const std::function<void ()> &continuati
m_treeCreationWatcher = new TreeCreationWatcher(this); m_treeCreationWatcher = new TreeCreationWatcher(this);
connect(m_treeCreationWatcher, &TreeCreationWatcher::finished, this, connect(m_treeCreationWatcher, &TreeCreationWatcher::finished, this,
[this, watcher = m_treeCreationWatcher, continuation] { [this, watcher = m_treeCreationWatcher, continuation] {
std::unique_ptr<QbsProjectNode> rootNode(m_treeCreationWatcher->result()); std::unique_ptr<QbsProjectNode> rootNode(watcher->result());
if (watcher != m_treeCreationWatcher) { if (watcher != m_treeCreationWatcher) {
watcher->deleteLater(); watcher->deleteLater();
return; return;

View File

@@ -823,28 +823,41 @@ static QString linkingPurposeText()
"Linking with a Qt installation automatically registers Qt versions and kits."); "Linking with a Qt installation automatically registers Qt versions and kits.");
} }
void QtOptionsPageWidget::setupLinkWithQtButton() static bool canLinkWithQt(QString *toolTip)
{ {
bool canLink = true;
bool installSettingsExist; bool installSettingsExist;
const Utils::optional<QString> installSettingsValue = currentlyLinkedQtDir( const Utils::optional<QString> installSettingsValue = currentlyLinkedQtDir(
&installSettingsExist); &installSettingsExist);
QStringList tip; QStringList tip;
tip << linkingPurposeText(); tip << linkingPurposeText();
if (!FilePath::fromString(Core::ICore::resourcePath()).isWritablePath()) { if (!FilePath::fromString(Core::ICore::resourcePath()).isWritablePath()) {
m_ui.linkWithQtButton->setEnabled(false); canLink = false;
tip << tr("%1's resource directory is not writable.").arg(Core::Constants::IDE_DISPLAY_NAME); tip << QtOptionsPageWidget::tr("%1's resource directory is not writable.")
.arg(Core::Constants::IDE_DISPLAY_NAME);
} }
// guard against redirecting Qt Creator that is part of a Qt installations // guard against redirecting Qt Creator that is part of a Qt installations
// TODO this fails for pre-releases in the online installer // TODO this fails for pre-releases in the online installer
// TODO this will fail when make Qt Creator non-required in the Qt installers // TODO this will fail when make Qt Creator non-required in the Qt installers
if (installSettingsExist && !installSettingsValue) { if (installSettingsExist && !installSettingsValue) {
m_ui.linkWithQtButton->setEnabled(false); canLink = false;
tip << tr("%1 is part of a Qt installation.").arg(Core::Constants::IDE_DISPLAY_NAME); tip << QtOptionsPageWidget::tr("%1 is part of a Qt installation.")
.arg(Core::Constants::IDE_DISPLAY_NAME);
} }
const QString link = installSettingsValue ? *installSettingsValue : QString(); const QString link = installSettingsValue ? *installSettingsValue : QString();
if (!link.isEmpty()) if (!link.isEmpty())
tip << tr("%1 is currently linked to \"%2\".").arg(Core::Constants::IDE_DISPLAY_NAME, link); tip << QtOptionsPageWidget::tr("%1 is currently linked to \"%2\".")
m_ui.linkWithQtButton->setToolTip(tip.join("\n\n")); .arg(Core::Constants::IDE_DISPLAY_NAME, link);
if (toolTip)
*toolTip = tip.join("\n\n");
return canLink;
}
void QtOptionsPageWidget::setupLinkWithQtButton()
{
QString tip;
canLinkWithQt(&tip);
m_ui.linkWithQtButton->setToolTip(tip);
connect(m_ui.linkWithQtButton, &QPushButton::clicked, this, &QtOptionsPage::linkWithQt); connect(m_ui.linkWithQtButton, &QPushButton::clicked, this, &QtOptionsPage::linkWithQt);
} }
@@ -1018,6 +1031,16 @@ QtOptionsPage::QtOptionsPage()
setWidgetCreator([] { return new QtOptionsPageWidget; }); setWidgetCreator([] { return new QtOptionsPageWidget; });
} }
bool QtOptionsPage::canLinkWithQt()
{
return Internal::canLinkWithQt(nullptr);
}
bool QtOptionsPage::isLinkedWithQt()
{
return currentlyLinkedQtDir(nullptr).has_value();
}
void QtOptionsPage::linkWithQt() void QtOptionsPage::linkWithQt()
{ {
QtOptionsPageWidget::linkWithQt(); QtOptionsPageWidget::linkWithQt();

View File

@@ -35,6 +35,8 @@ class QtOptionsPage final : public Core::IOptionsPage
public: public:
QtOptionsPage(); QtOptionsPage();
static bool canLinkWithQt();
static bool isLinkedWithQt();
static void linkWithQt(); static void linkWithQt();
}; };

View File

@@ -122,7 +122,7 @@ static void askAboutQtInstallation()
{ {
// if the install settings exist, the Qt Creator installation is (probably) already linked to // if the install settings exist, the Qt Creator installation is (probably) already linked to
// a Qt installation, so don't ask // a Qt installation, so don't ask
if (QFile::exists(ICore::settings(QSettings::SystemScope)->fileName()) if (!QtOptionsPage::canLinkWithQt() || QtOptionsPage::isLinkedWithQt()
|| !ICore::infoBar()->canInfoBeAdded(kLinkWithQtInstallationSetting)) || !ICore::infoBar()->canInfoBeAdded(kLinkWithQtInstallationSetting))
return; return;

View File

@@ -129,7 +129,7 @@ def fetchSnippet(protocol, description, pasteId, skippedPasting):
closeHTTPStatusAndPasterDialog(protocol, ':PasteSelectDialog_CodePaster::PasteSelectDialog') closeHTTPStatusAndPasterDialog(protocol, ':PasteSelectDialog_CodePaster::PasteSelectDialog')
return -1 return -1
waitFor("pasteModel.rowCount() > 1", 20000) waitFor("pasteModel.rowCount() > 1", 20000)
if (not skippedPasting and not any(map(lambda str:pasteId in str, dumpItems(pasteModel)))): if (protocol != NAME_PBCOM and not skippedPasting and not any(map(lambda str:pasteId in str, dumpItems(pasteModel)))):
test.warning("Fetching too fast for server of %s - waiting 3s and trying to refresh." % protocol) test.warning("Fetching too fast for server of %s - waiting 3s and trying to refresh." % protocol)
snooze(3) snooze(3)
clickButton("{text='Refresh' type='QPushButton' unnamed='1' visible='1' " clickButton("{text='Refresh' type='QPushButton' unnamed='1' visible='1' "
@@ -152,7 +152,11 @@ def fetchSnippet(protocol, description, pasteId, skippedPasting):
"Verify that line in list of pastes contains the description") "Verify that line in list of pastes contains the description")
except: except:
if not skippedPasting: if not skippedPasting:
test.fail("Could not find id '%s' in list of pastes from %s" % (pasteId, protocol)) message = "Could not find id '%s' in list of pastes from %s" % (pasteId, protocol)
if protocol == NAME_PBCOM:
test.xfail(message, "pastebin.com does not show pastes in list anymore")
else:
test.fail(message)
foundSnippet = False foundSnippet = False
replaceEditorContent(waitForObject(":PasteSelectDialog.pasteEdit_QLineEdit"), pasteId) replaceEditorContent(waitForObject(":PasteSelectDialog.pasteEdit_QLineEdit"), pasteId)
if foundSnippet: if foundSnippet: