diff --git a/doc/qtcreator/images/qtquick-designer-abstract-button-properties.png b/doc/qtcreator/images/qtquick-designer-abstract-button-properties.png index be462966dca..4f227390f78 100644 Binary files a/doc/qtcreator/images/qtquick-designer-abstract-button-properties.png and b/doc/qtcreator/images/qtquick-designer-abstract-button-properties.png differ diff --git a/doc/qtcreator/images/qtquick-designer-button-properties.png b/doc/qtcreator/images/qtquick-designer-button-properties.png new file mode 100644 index 00000000000..37feedc5856 Binary files /dev/null and b/doc/qtcreator/images/qtquick-designer-button-properties.png differ diff --git a/doc/qtcreator/images/qtquick-designer-combobox-properties.png b/doc/qtcreator/images/qtquick-designer-combobox-properties.png index 0204cedf317..1c5c9c2a7ed 100644 Binary files a/doc/qtcreator/images/qtquick-designer-combobox-properties.png and b/doc/qtcreator/images/qtquick-designer-combobox-properties.png differ diff --git a/doc/qtcreator/images/qtquick-designer-control-properties.png b/doc/qtcreator/images/qtquick-designer-control-properties.png index b80c2f75e68..72913fe83be 100644 Binary files a/doc/qtcreator/images/qtquick-designer-control-properties.png and b/doc/qtcreator/images/qtquick-designer-control-properties.png differ diff --git a/doc/qtcreator/images/qtquick-designer-dial-properties.png b/doc/qtcreator/images/qtquick-designer-dial-properties.png index 373b4ded07e..4ff79b8573d 100644 Binary files a/doc/qtcreator/images/qtquick-designer-dial-properties.png and b/doc/qtcreator/images/qtquick-designer-dial-properties.png differ diff --git a/doc/qtcreator/images/qtquick-designer-flickable-geometry.png b/doc/qtcreator/images/qtquick-designer-flickable-geometry.png new file mode 100644 index 00000000000..e8ab376c335 Binary files /dev/null and b/doc/qtcreator/images/qtquick-designer-flickable-geometry.png differ diff --git a/doc/qtcreator/images/qtquick-designer-flickable-properties.png b/doc/qtcreator/images/qtquick-designer-flickable-properties.png index e4580f26dff..e52eabce208 100644 Binary files a/doc/qtcreator/images/qtquick-designer-flickable-properties.png and b/doc/qtcreator/images/qtquick-designer-flickable-properties.png differ diff --git a/doc/qtcreator/images/qtquick-designer-gridview-properties.png b/doc/qtcreator/images/qtquick-designer-gridview-properties.png index 2bb0ebf9268..a434bc0ef56 100644 Binary files a/doc/qtcreator/images/qtquick-designer-gridview-properties.png and b/doc/qtcreator/images/qtquick-designer-gridview-properties.png differ diff --git a/doc/qtcreator/images/qtquick-designer-listview-highlight-properties.png b/doc/qtcreator/images/qtquick-designer-listview-highlight-properties.png new file mode 100644 index 00000000000..6196edd2d04 Binary files /dev/null and b/doc/qtcreator/images/qtquick-designer-listview-highlight-properties.png differ diff --git a/doc/qtcreator/images/qtquick-designer-listview-properties.png b/doc/qtcreator/images/qtquick-designer-listview-properties.png index 3a52df83d3d..a41b0117eb4 100644 Binary files a/doc/qtcreator/images/qtquick-designer-listview-properties.png and b/doc/qtcreator/images/qtquick-designer-listview-properties.png differ diff --git a/doc/qtcreator/images/qtquick-designer-pathview-properties.png b/doc/qtcreator/images/qtquick-designer-pathview-properties.png index f2fb4286e0e..67600f7a131 100644 Binary files a/doc/qtcreator/images/qtquick-designer-pathview-properties.png and b/doc/qtcreator/images/qtquick-designer-pathview-properties.png differ diff --git a/doc/qtcreator/images/qtquick-designer-progressbar-properties.png b/doc/qtcreator/images/qtquick-designer-progressbar-properties.png index ee54a6b470b..46e7115be2c 100644 Binary files a/doc/qtcreator/images/qtquick-designer-progressbar-properties.png and b/doc/qtcreator/images/qtquick-designer-progressbar-properties.png differ diff --git a/doc/qtcreator/images/qtquick-designer-range-slider-properties.png b/doc/qtcreator/images/qtquick-designer-range-slider-properties.png index d5da30cc558..1dd5f0b27a4 100644 Binary files a/doc/qtcreator/images/qtquick-designer-range-slider-properties.png and b/doc/qtcreator/images/qtquick-designer-range-slider-properties.png differ diff --git a/doc/qtcreator/images/qtquick-designer-round-button-properties.png b/doc/qtcreator/images/qtquick-designer-round-button-properties.png new file mode 100644 index 00000000000..7b98cc3275d Binary files /dev/null and b/doc/qtcreator/images/qtquick-designer-round-button-properties.png differ diff --git a/doc/qtcreator/images/qtquick-designer-style-list.png b/doc/qtcreator/images/qtquick-designer-style-list.png index a83519d2f02..fa43018219b 100644 Binary files a/doc/qtcreator/images/qtquick-designer-style-list.png and b/doc/qtcreator/images/qtquick-designer-style-list.png differ diff --git a/doc/qtcreator/images/qtquick-designer-tabbar-properties.png b/doc/qtcreator/images/qtquick-designer-tabbar-properties.png index 819bf713b7e..cd162ca4806 100644 Binary files a/doc/qtcreator/images/qtquick-designer-tabbar-properties.png and b/doc/qtcreator/images/qtquick-designer-tabbar-properties.png differ diff --git a/doc/qtcreator/images/qtquick-designer-toolbar-properties.png b/doc/qtcreator/images/qtquick-designer-toolbar-properties.png index 3b1164e4ad6..5551f739003 100644 Binary files a/doc/qtcreator/images/qtquick-designer-toolbar-properties.png and b/doc/qtcreator/images/qtquick-designer-toolbar-properties.png differ diff --git a/doc/qtcreator/images/qtquick-designer-tumbler-properties.png b/doc/qtcreator/images/qtquick-designer-tumbler-properties.png index 35c67e064f8..8190c8c89a9 100644 Binary files a/doc/qtcreator/images/qtquick-designer-tumbler-properties.png and b/doc/qtcreator/images/qtquick-designer-tumbler-properties.png differ diff --git a/doc/qtcreator/images/qtquick-properties-busy-indicator.png b/doc/qtcreator/images/qtquick-properties-busy-indicator.png new file mode 100644 index 00000000000..0880b56f8f1 Binary files /dev/null and b/doc/qtcreator/images/qtquick-properties-busy-indicator.png differ diff --git a/doc/qtcreator/images/qtquick-properties-check-box.png b/doc/qtcreator/images/qtquick-properties-check-box.png new file mode 100644 index 00000000000..6a584d15865 Binary files /dev/null and b/doc/qtcreator/images/qtquick-properties-check-box.png differ diff --git a/doc/qtcreator/images/qtquick-properties-mouse-area-drag.png b/doc/qtcreator/images/qtquick-properties-mouse-area-drag.png new file mode 100644 index 00000000000..c71ed958b3f Binary files /dev/null and b/doc/qtcreator/images/qtquick-properties-mouse-area-drag.png differ diff --git a/doc/qtcreator/images/qtquick-properties-mouse-area.png b/doc/qtcreator/images/qtquick-properties-mouse-area.png new file mode 100644 index 00000000000..fe54cbb01bc Binary files /dev/null and b/doc/qtcreator/images/qtquick-properties-mouse-area.png differ diff --git a/doc/qtcreator/images/qtquick-properties-page-indicator.png b/doc/qtcreator/images/qtquick-properties-page-indicator.png new file mode 100644 index 00000000000..dcb0a03d1c4 Binary files /dev/null and b/doc/qtcreator/images/qtquick-properties-page-indicator.png differ diff --git a/doc/qtcreator/src/qtquick/library/qtquick-controls.qdoc b/doc/qtcreator/src/qtquick/library/qtquick-controls.qdoc index d1d6b59339c..a9153f6bcfb 100644 --- a/doc/qtcreator/src/qtquick/library/qtquick-controls.qdoc +++ b/doc/qtcreator/src/qtquick/library/qtquick-controls.qdoc @@ -25,8 +25,8 @@ /*! \page quick-controls.html - \previouspage quick-images.html - \nextpage quick-user-interaction-methods.html + \previouspage quick-user-interaction-methods.html + \nextpage quick-data-models.html \title UI Controls @@ -60,7 +60,7 @@ \image qtquick-designer-control-properties.png "Control section in Properties" - The \uicontrol Enabled check box indicates whether the control is enabled. + The \uicontrol Enable check box indicates whether the control is enabled. The value of the \uicontrol {Focus policy} field determines whether the control accepts focus by tabbing, clicking, and using the mouse wheel. @@ -98,8 +98,8 @@ layout. \endlist - For more information about setting text properties, see \l Fonts and - \l Padding. + For more information about setting text properties, see + \l {Character Properties} and \l Padding. The properties that are shared by all button controls are described in: @@ -133,18 +133,31 @@ Don't use a button to set state, because a \l Switch is more suitable for that purpose. - Select the \uicontrol Highlighted check box to draw the users' attention - towards a button. Highlighting a button has no effect on keyboard - interaction. + \section3 Highlighted Buttons + + Select the \uicontrol Highlight check box in the \uicontrol Button section + to draw the users' attention towards a button. Highlighting a button has no + effect on keyboard interaction. + + \image qtquick-designer-button-properties.png "Button properties" + + The following image shows an example of a highlighted button: \image qtquickcontrols2-button-highlighted.gif "Highlighted button" + \section3 Flat Buttons + A flat button typically does not draw a background unless it is pressed or - checked. To create a flat button, select the \uicontrol Flat check box. + checked. To create a flat button, select the \uicontrol Flat check box in + the \uicontrol Button section. + + The following image shows an example of a flat button: \image qtquickcontrols2-button-flat.gif "Flat button" \if defined(qtdesignstudio) + \section3 Icon Buttons + To create a button that contains an icon, use the wizard template to \l{Creating Custom Controls}{create a custom button} and drag-and-drop the icon to the button background component. For an example of using the @@ -155,10 +168,10 @@ \image qtquickcontrols2-delaybutton.gif "Delay button" - \uicontrol {Delay Button} incorporates a delay before triggering an action. - This delay prevents accidental presses. + The \uicontrol {Delay Button} control incorporates a delay before + triggering an action. This delay prevents accidental presses. - Use delay buttons in touch user interfaces and for actions that must be + Use delay buttons in touch UIs and for actions that must be triggered with care. You can set the delay in milliseconds in the \uicontrol Delay field. @@ -181,10 +194,16 @@ A check box presents an option button that can be toggled on (checked) or off (unchecked). Check boxes are typically used to select one or more options from a set of options. For larger sets of options, - such as those in a list, consider using \uicontrol {Check Delegate} instead. + such as those in a list, consider creating an instance of the + \uicontrol {Check Delegate} control instead. \image qtquickcontrols2-checkdelegate.gif "Check delegate" + A delegate can be highlighted in order to draw the user's attention towards + it. Highlighting has no effect on keyboard interaction. Select the + \uicontrol Highlight check box in the \uicontrol {Item Delegate} section to + highlight the delegate. + Use check boxes to build multi-selection option lists where any number of options can be selected, including none, but the options are not mutually exclusive. @@ -195,13 +214,17 @@ use a check box. If they are choosing between actions to be taken, a switch is recommended. - The value of the \uicontrol Checked property determines the state of the + The value of the \uicontrol Checked check box in the + \uicontrol {Button Content} section determines the state of the check box. However, in addition to the checked and unchecked states, a check box has a third state: \e {partially checked}. - Select the \uicontrol Tri-state check box to enable the check box to cycle - between checked, partially checked, and unchecked states when users - toggle it by using touch, mouse, or keyboard. + \image qtquick-properties-check-box.png "Check Box properties" + + Select the \uicontrol Tri-state check box in the \uicontrol {Check Box} + section to enable the check box to cycle between checked, partially + checked, and unchecked states when users toggle it by using touch, mouse, + or keyboard. \image qtquickcontrols2-checkbox-tristate.gif "Tri-state check box" @@ -233,6 +256,9 @@ \image qtquickcontrols2-radiodelegate.gif "Radio delegate" + Select the \uicontrol Highlight check box in the \uicontrol {Radio Delegate} + section to highlight the delegate. + Recommendations for radio buttons: \list @@ -265,6 +291,9 @@ \image qtquickcontrols2-switchdelegate.gif "Switch delegate" + Select the \uicontrol Highlight check box in the \uicontrol {Item Delegate} + section to highlight the delegate. + Use a switch for binary operations that take effect immediately after the switch is toggled. For example, use a switch to turn WiFi on or off. @@ -275,16 +304,27 @@ one-letter font icon is circular. A circular round button takes less space than a normal button, and can also be used as a floating action button. - A round button has the same properties as a \l Button. + In addition to common \l Button properties, a round button has the + \uicontrol Radius property, which holds the radius of the button. + + \image qtquick-designer-round-button-properties.png "Round Button properties" + + To create a relatively square button that has slightly rounded corners, use + a small value, such as 3. + + To create a completely circular button, use a value that is equal to half + of the width or height of the button, and make the button's width and height + identical. \section2 Displaying Text and Icons A button can contain text, an icon, or both. Specify the button text in - the \uicontrol Text field. The value of the \uicontrol Display field - determines whether only text or an icon is displayed, or when both are - visible, whether the text is placed beside the icon or under it. + the \uicontrol Text field in the \uicontrol {Button Content} section. The + value of the \uicontrol Display field determines whether only text or an + icon is displayed, or when both are visible, whether the text is placed + beside the icon or under it. - \image qtquick-designer-abstract-button-properties.png "General button properties" + \image qtquick-designer-abstract-button-properties.png "Button Content properties" \section2 Checking Buttons @@ -342,6 +382,11 @@ Select the \uicontrol Running check box to make the busy indicator visible. + \image qtquick-properties-busy-indicator.png "Busy Indicator properties" + + Select the \uicontrol Live check box to provide live updates of the + progress. + Typical places for a busy indicator are: \list @@ -357,6 +402,18 @@ \uicontrol Count field. Select the current page in the \uicontrol Current field. + \image qtquick-properties-page-indicator.png "Page Indicator properties" + + Select the \uicontrol Interactive check box to determine that the page + indicator reacts to presses and automatically changes the value of the + \uicontrol Current field accordingly. + + Page indicators are typically quite small in order to avoid distracting the + user from the actual content of the UI. Therefore, they can be hard to + click, and might not be easily recognized as interactive by users. For these + reasons, they are best used to complement primary methods of navigation, + such as a \uicontrol {Swipe View}, not replace them. + \target progress-bar-control \section2 Progress Bar @@ -391,7 +448,7 @@ \section1 Selectors - Qt Quick Controls offers a set of selector-like controls, such as sliders, + Qt Quick Controls offer a set of selector-like controls, such as sliders, dial, spin box, combo box, and tumbler, for specific use cases. The following sections contain guidelines for choosing the selector most suitable for a use case. @@ -438,8 +495,9 @@ In the \uicontrol From and \uicontrol To fields, set the range of the slider or dial. Set the value of the slide handle or dial in the \uicontrol Value field. For a range slider, set the initial positions - of the first and second handles in the \uicontrol {First value} and - \uicontrol {Second value} fields. + of the first and second handles in the \uicontrol {Value 1} and + \uicontrol {Value 2} fields. Select the \uicontrol Live check box to + provide live updates of the value properties. \image qtquick-designer-range-slider-properties.png "Range slider properties" @@ -451,10 +509,7 @@ You can set slider orientation to horizontal or vertical in the \uicontrol Orientation field. - Select the \uicontrol Live check box to provide live updates of the value - properties. - - Modify the \uicontrol {Touch drag threshold} to determine the threshold at + Modify the \uicontrol {Drag threshold} to determine the threshold at which a touch drag event will be initiated. For more information, watch the following video: @@ -493,7 +548,7 @@ Select the \uicontrol Editable check box to enable users to enter a text value in the input field. - The other spin box properties are similar to those of a dial. + The other spin box properties are similar to those of a \uicontrol {Dial}. \section2 Combo Box @@ -520,9 +575,9 @@ To use a role of the model item that corresponds to the text role, enter \c valueRole in the field. - The \uicontrol Current property is the index of the current item in the - combo box. The default value is \c -1 when the combo box is empty, and - \c 0 otherwise. + The \uicontrol {Current index} field contains the index of the item that + is displayed in the combo box. The default value is \c -1 when the combo + box is empty and \c 0 otherwise. A flat combo box does not draw a background unless it is interacted with, which makes it blend into the UI. Use flat combo @@ -533,7 +588,7 @@ Recommendations for combo boxes: \list - \li If the number of values very large, consider applying a filter. + \li If the number of values is very large, consider applying a filter. \li If the number of values is small, consider using \l {Radio Button}, so that users can see all options at the same time. \li Set a default value, which should be the value that you expect @@ -551,8 +606,8 @@ usage and wraps around at each end when there are a large number of items. Specify the number of visible options in the \uicontrol {Visible count} - field. Select the index of the current option in the \uicontrol Current - field. + field. Select the index of the current option in the + \uicontrol {Current index} field. \image qtquick-designer-tumbler-properties.png "Tumbler properties" @@ -568,14 +623,15 @@ position in the \uicontrol Position field. Typically, a tab bar contains a static set of \uicontrol {Tab Button} - controls that are defined as its children. The \uicontrol Current - field shows the index of the current tab button. The default value is - \c -1 when the tab bar is empty, and \c 0 otherwise. + controls that are defined as its children. The \uicontrol {Current index} + field in the \uicontrol Container section shows the index of the current + tab button. The default value is \c -1 when the tab bar is empty and + \c 0 otherwise. \image qtquick-designer-tabbar-properties.png "Tab Bar properties" - You can specify content size in the \uicontrol {Content width} and - \uicontrol {Content height} fields. + You can specify content width (\uicontrol W) and height (\uicontrol H) + in the \uicontrol {Content size} field. If the total width of the buttons exceeds the available width of the tab bar, it automatically becomes \l{Flickable}{flickable}. @@ -601,8 +657,9 @@ position its contents, for instance by creating a \l RowLayout. If the toolbar contains only one item, it will resize to fit the implicit item size. This makes a toolbar particularly suitable for use together with - \l{Using Layouts}{layouts}. However, you can specify content size in the - \uicontrol {Content width} and \uicontrol {Content height} fields. + \l{Using Layouts}{layouts}. However, you can specify content width + (\uicontrol W) and height (\uicontrol H) in the \uicontrol {Content size} + field in the \uicontrol Pane section. \uicontrol {Tool Separator} is used to visually distinguish between groups of items on a toolbar by separating them with a line. It can @@ -655,8 +712,8 @@ The following table lists preset UI controls with links to their developer documentation. They are available in \l Library > \uicontrol Components > - \uicontrol {Qt Quick Controls} > \uicontrol Controls. The \e MCU column - indicates which controls are supported on MCUs. + \uicontrol {Qt Quick Controls}. The \e MCU column indicates which controls + are supported on MCUs. \table \header diff --git a/doc/qtcreator/src/qtquick/library/qtquick-data-models.qdoc b/doc/qtcreator/src/qtquick/library/qtquick-data-models.qdoc index 8ec8aaf895f..2f07c78861b 100644 --- a/doc/qtcreator/src/qtquick/library/qtquick-data-models.qdoc +++ b/doc/qtcreator/src/qtquick/library/qtquick-data-models.qdoc @@ -25,7 +25,7 @@ /*! \page quick-data-models.html - \previouspage quick-user-interaction-methods.html + \previouspage quick-controls.html \if defined(qtdesignstudio) \nextpage quick-2d-effects.html \else @@ -56,15 +56,20 @@ \section1 List and Grid Views - A list view organizes components as a list, whereas a grid view organizes - them as a grid. By default, components in list and grid views flow - vertically from left to right. They are laid out from left to right - horizontally, and from top to bottom vertically. + Create instances of \uicontrol {List View} and \uicontrol {Grid View} + components to organize other component instances in list or grid format. + They are available in \l Library > \uicontrol Components > + \uicontrol {Default Components} > \uicontrol Views. + + A \uicontrol {List View} organizes other components as a list, whereas a + \uicontrol {Grid View} organizes them as a grid. By default, components + in list and grid views flow vertically from left to right. They are laid + out from left to right horizontally, and from top to bottom vertically. You can change the list view orientation in the \uicontrol Orientation field and the grid view flow in the \uicontrol Flow field. You can change - the layout direction in the \uicontrol {Layout direction} field. These - properties can be combined to produce a variety of layouts. + the layout direction in the \uicontrol {Layout direction} field. By setting + values for these properties, you can produce a variety of layouts. \image qtquick-designer-listview-properties.png "List View properties" @@ -100,8 +105,8 @@ and the cache is set to 40, then up to six delegates above and below the visible area may be created or retained. The cached delegates are created asynchronously, allowing creation to occur across multiple frames and - reducing the likelihood of skipping frames. In order to improve painting - performance delegates outside the visible area are not painted. + reducing the likelihood of skipping frames. To improve painting performance, + delegates outside the visible area are not painted. The default value of this property is platform dependent, but will usually be a value greater than zero. Negative values are ignored. @@ -118,6 +123,11 @@ \section1 View Highlight + In the \uicontrol {List View Highlight} and \uicontrol {Grid View Highlight} + sections, you can specify properties for highlighting items in views. + + \image qtquick-designer-listview-highlight-properties.png "List View Highlight properties" + The current item in a list or grid view is higlighted if you set the value of the \uicontrol Range field to \uicontrol ApplyRange or \uicontrol StrictlyEnforceRange. When you select to apply the @@ -137,12 +147,12 @@ current item is in the middle of the view. The begin value must be less than the end value. - Select the \uicontrol {Follows current item} check box to enable the view to + Select the \uicontrol {Follows current} check box to enable the view to manage the highlight. The highlight is moved smoothly to follow the current item. Otherwise, the highlight is not moved by the view, and any movement must be implemented by the highlight. - The values of the \uicontrol {Move duration}, \uicontrol {Move velocity} + The values of the \uicontrol {Move duration}, \uicontrol {Move velocity}, \uicontrol {Resize duration}, and \uicontrol {Resize velocity} fields control the speed of the move and resize animations for the highlight. @@ -186,9 +196,9 @@ \section1 Summary of Model Components The following table lists the components that you can use to add data models - to UIs. The \e Location column contains the tab name where you can find the - component in \l Library > \uicontrol Components. The \e MCU column indicates - which components are supported on MCUs. + to UIs. The \e Location column indicates the location of the component in + \l Library > \uicontrol Components. The \e MCU column indicates which + components are supported on MCUs. \table \header diff --git a/doc/qtcreator/src/qtquick/library/qtquick-images.qdoc b/doc/qtcreator/src/qtquick/library/qtquick-images.qdoc index 66f85db78e0..10ef412b118 100644 --- a/doc/qtcreator/src/qtquick/library/qtquick-images.qdoc +++ b/doc/qtcreator/src/qtquick/library/qtquick-images.qdoc @@ -26,7 +26,7 @@ /*! \page quick-images.html \previouspage quick-text.html - \nextpage quick-controls.html + \nextpage quick-user-interaction-methods.html \title Images \target basic-image diff --git a/doc/qtcreator/src/qtquick/library/qtquick-pathview-editor.qdocinc b/doc/qtcreator/src/qtquick/library/qtquick-pathview-editor.qdocinc index 6fd54606d5c..83bd827f391 100644 --- a/doc/qtcreator/src/qtquick/library/qtquick-pathview-editor.qdocinc +++ b/doc/qtcreator/src/qtquick/library/qtquick-pathview-editor.qdocinc @@ -28,10 +28,11 @@ \section1 Path View - The Path View component lays out data provided by data models on a \l{Path}. + A \uicontrol {Path View} component lays out data provided by data models + on a \l{Path}. A graphical spline editor enables you to specify path view paths, which - is a non-trivial task to do in the code editor. + is a non-trivial task to do in \uicontrol {Text Editor}. \image qmldesigner-pathview-editor.png "Path View editor" @@ -52,7 +53,7 @@ To add intermediary points to a curve segment, select \uicontrol {Split Segment} in the context menu. - In the \uicontrol Properties view, you can specify other properties for + In the \uicontrol {Path View} section, you can specify other properties for the path view. The value of the \uicontrol {Drag margin} field specifies the maximum distance from the path that initiates mouse dragging. @@ -67,6 +68,9 @@ 0 to the value of the \uicontrol {Item count} field, which displays the number of items in the model. + In the \uicontrol {Path View Highlight} section, you can specify properties + for \l{View Highlight}{highlighting} path objects. + \if defined(qtdesignstudio) \note You can also use the \l {SVG Path Item} Studio Component to specify an SVG path data string that draws a path. @@ -81,14 +85,17 @@ The \uicontrol {SVG Path Item} component uses an SVG path data string to draw a path as a line. + Setting path colors is described in \l {Picking Colors}. + The stroke property values that specify the appearance of the path are described in \l{Strokes}. - \image studio-svgpath-properties.png "Svg Path properties" + \image studio-svgpath-properties.png "SVG Path Item properties" - The \uicontrol {Path data} field contains the SVG path data - string that specifies the path. For more information, see - \l{https://www.w3.org/TR/SVG/paths.html#PathData}{W3C SVG Path Data}. + The \uicontrol {Path data} field in the \uicontrol {Path Info} section + contains the SVG path data string that specifies the path. For more + information, see \l{https://www.w3.org/TR/SVG/paths.html#PathData} + {W3C SVG Path Data}. //! [svgpath] */ diff --git a/doc/qtcreator/src/qtquick/library/qtquick-user-interaction-methods.qdoc b/doc/qtcreator/src/qtquick/library/qtquick-user-interaction-methods.qdoc index 1ac117d9e1a..9628aa14989 100644 --- a/doc/qtcreator/src/qtquick/library/qtquick-user-interaction-methods.qdoc +++ b/doc/qtcreator/src/qtquick/library/qtquick-user-interaction-methods.qdoc @@ -25,8 +25,8 @@ /*! \page quick-user-interaction-methods.html - \previouspage quick-controls.html - \nextpage quick-data-models.html + \previouspage quick-images.html + \nextpage quick-controls.html \title User Interaction Methods @@ -86,6 +86,105 @@ mouse and touchscreen, is via \l {Qt Quick Input Handlers}. \endif + \section2 Mouse Area Properties + + A \uicontrol {Mouse Area} is an invisible component that is typically used + in conjunction with a visible component in order to provide mouse handling + for that component. By effectively acting as a proxy, the logic for mouse + handling can be contained within a \uicontrol {Mouse Area} component. + + Select the \uicontrol Enable check box to enable mouse handling for the + proxied component. When disabled, the mouse area becomes transparent to + mouse events. + + \image qtquick-properties-mouse-area.png "Mouse Area properties" + + By default, \uicontrol {Mouse Area} components only report mouse clicks and + not changes to the position of the mouse cursor. Select the \uicontrol Hover + check box to ensure that the appropriate handlers are used and the values of + other properties are updated as necessary even when no mouse buttons are + pressed. + + Even though \uicontrol {Mouse Area} is an invisible component, it has a + \uicontrol Visible property. Deselect the \uicontrol Visible check box in + the \uicontrol Visibility section to make the mouse area transparent to + mouse events. + + In the \uicontrol {Accepted buttons} field, select the mouse button that + the mouse area reacts to. Select \uicontrol AllButtons to have the mouse + are react to all mouse buttons. + + In the \uicontrol {Cursor shape} field, select the cursor shape for this + mouse area. On platforms that do not display a mouse cursor, this value + may have no effect. + + In the \uicontrol {Hold interval} field, specify a value to override the + elapsed time in milliseconds before the \c pressAndHold() signal is emitted. + If you do not explicitly set the value or it is reset, it follows the + globally set application style hint. Set this value if you need particular + intervals for particular \uicontrol {Mouse Area} instances. + + Select the \uicontrol {Scroll gesture} check box to respond to scroll + gestures from non-mouse devices, such as the 2-finger flick gesture on + a trackpad. If the check box is not selected, the wheel signal is emitted + only when the wheel event comes from an actual mouse with a wheel, while + scroll gesture events will pass through to any other component that will + handle them. For example, the user might perform a flick gesture while the + cursor is over a component containing a \uicontrol {Mouse Area} instance, + intending to interact with a \uicontrol Flickable component which is + underneath. Setting this property to \c false will allow the \l PinchArea + component to handle the mouse wheel or the pinch gesture, while the + \uicontrol Flickable handles the flick gesture. + + Information about the mouse position and button clicks are provided via + signals for which event handler properties are defined. If a mouse area + overlaps with the area of other instances of the \uicontrol {Mouse Area} + components, you can propagate \c clicked(), \c doubleClicked(), and + \c pressAndHold() events to these other components by selecting the + \uicontrol {Propagate events} check box. Each event is propagated to the + next enabled \uicontrol {Mouse Area} beneath it in the stacking order, + propagating down this visual hierarchy until a \uicontrol {Mouse Area} + accepts the event. + + \section2 Advanced Mouse Area Properties + + You can place a \uicontrol {Mouse Area} instance within a component that + filters child mouse events, such as \uicontrol Flickable. However, the + mouse events might get stolen from the \uicontrol {Mouse Area} if a gesture, + such as a flick, is recognized by the parent component. + + Select the \uicontrol {Prevent stealing} check box to stop mouse events from + being stolen from the \uicontrol {Mouse Area} instance. This value will take + no effect until the next \c press() event if it is set once a component has + started stealing events. + + For more information, see the developer documentation for the \l {MouseArea} + {Mouse Area} component. + + \section2 Drag Properties + + You can specify properties for dragging components in the \uicontrol Drag + section. Select the component to drag in the \uicontrol Target field. + Keep in mind that anchored components cannot be dragged. + + \image qtquick-properties-mouse-area-drag.png "Drag properties" + + In the \uicontrol Axis field, specify whether dragging can be done + horizontally, vertically, or both. + + In the \uicontrol Threshold field, set the threshold in pixels of when the + drag operation should start. By default, this value is bound to a platform + dependent value. + + Select the \uicontrol {Filter children} check box to enable dragging to + override descendant \uicontrol {Mouse Area} instances. This enables a + parent \uicontrol {Mouse Area} instance to handle drags, for example, while + the descendant areas handle clicks. + + Select the \uicontrol Smoothed check box to move the target component only + after the drag operation has started. If this check box is not selected, the + target component is moved straight to the current mouse position. + \section1 Focus Scope When a key is pressed or released, a key event is generated and delivered @@ -133,17 +232,18 @@ this dragging action is often complemented with a flicking action, where scrolling continues after the user has stopped touching the view. - The contents of a flickable component are not automatically clipped. If - the component is not used as a full-screen component, consider selecting the - \uicontrol Clip check box in the \uicontrol Visibility section. + The contents of a \uicontrol Flickable component are not automatically + clipped. If the component is not used as a full-screen component, consider + selecting the \uicontrol Clip check box in the \uicontrol Visibility + section. \image qtquick-designer-flickable-properties.png "Flickable properties" Users can interact with a flickable component if the \uicontrol Interactive - property is set to \c true. Set it to \c false to temporarily disable + check box is set to \c true. Set it to \c false to temporarily disable flicking. This enables special interaction with the component's children. For example, you might want to freeze a flickable map while scrolling - through a pop-up that is a child of the Flickable. + through a pop-up that is a child of the \uicontrol Flickable component. The \uicontrol {Flick direction} field determines whether the view can be flicked horizontally or vertically. Select \uicontrol AutoFlickDirection @@ -154,9 +254,9 @@ Specify the maximum velocity for flicking the view in pixels per second in the \uicontrol {Max. velocity} field. Specify the rate at which a flick - will decelerate in the \uicontrol Decelerate field. + will decelerate in the \uicontrol Deceleration field. - The \uicontrol {Bounds movement} property determines whether the flickable + The value of the \uicontrol Movement field determines whether the flickable will give a feeling that the edges of the view are soft, rather than a hard physical boundary. Select \uicontrol StopAtBounds for custom edge effects where the contents do not follow drags or flicks beyond the bounds of the @@ -176,11 +276,11 @@ exceeds the platform drag threshold, the press event will be delivered regardless of this property. - The \uicontrol {Pixel aligned} property sets the alignment of - \uicontrol {Content X} and \uicontrol {Content Y} to pixels (\c true) - or subpixels (\c false). Enable it to optimize for still content or - moving content with high constrast edges, such as one-pixel-wide lines, - text, or vector graphics. Disable this property when optimizing for + The \uicontrol {Pixel aligned} check box sets the unit of alignment set in + the \uicontrol Content \uicontrol X and \uicontrol Y fields to pixels + (\c true) or subpixels (\c false). Set it to \c true to optimize for still + content or moving content with high constrast edges, such as one-pixel-wide + lines, text, or vector graphics. Set it to \c false when optimizing for animation quality. If \uicontrol {Synchronous drag} is set to \c true, then when the mouse or @@ -190,11 +290,16 @@ provides a smoother experience (no jump) at the cost of losing some of the drag distance at the beginning. + \section2 Flickable Geometry + The \uicontrol {Content size} field specifies the dimensions of the surface controlled by a flickable. Typically, set the values of the \uicontrol W and \uicontrol H fields to the combined size of the components placed in the flickable. You can set additional margins around the - content in the \uicontrol Margins field. + content in the \uicontrol {Left margin}, \uicontrol {Right margin}, + \uicontrol {Top margin}, and \uicontrol {Bottom margin} fields. + + \image qtquick-designer-flickable-geometry.png "Flickable geometry properties" The \uicontrol Origin field specifies the origin of the content. It refers to the top-left position of the content regardless of layout @@ -221,7 +326,7 @@ \li \inlineimage flickable-icon16.png \li \l [QML]{Flickable} \li \inlineimage ok - \li Items can be flicked horizontally or vertically. + \li Enables flicking components horizontally or vertically. \row \li \inlineimage focusscope-icon16.png \li \l{FocusScope}{Focus Scope} diff --git a/doc/qtdesignstudio/images/studio-svgpath-properties.png b/doc/qtdesignstudio/images/studio-svgpath-properties.png index dafb9491c50..869eee2251d 100644 Binary files a/doc/qtdesignstudio/images/studio-svgpath-properties.png and b/doc/qtdesignstudio/images/studio-svgpath-properties.png differ diff --git a/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemDelegate.qml b/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemDelegate.qml index 3f59deb8061..88774a1b434 100644 --- a/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemDelegate.qml +++ b/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemDelegate.qml @@ -81,7 +81,7 @@ Item { anchors.fill: parent onShowContextMenu: delegateRoot.showContextMenu() - onPressed: { + onPressed: (mouse)=> { if (mouse.button === Qt.LeftButton) rootView.startDragAndDrop(itemLibraryEntry, mapToGlobal(mouse.x, mouse.y)) } diff --git a/share/qtcreator/qmldesigner/itemLibraryQmlSources/LibraryHeader.qml b/share/qtcreator/qmldesigner/itemLibraryQmlSources/LibraryHeader.qml index 52570b230c0..8eaa7bbcc75 100644 --- a/share/qtcreator/qmldesigner/itemLibraryQmlSources/LibraryHeader.qml +++ b/share/qtcreator/qmldesigner/itemLibraryQmlSources/LibraryHeader.qml @@ -111,8 +111,8 @@ Item { id: mouseArea anchors.fill: parent hoverEnabled: true - onClicked: index == 0 ? rootView.handleAddModule() - : rootView.handleAddAsset() + onClicked: index === 0 ? rootView.handleAddModule() + : rootView.handleAddAsset() tooltip: modelData.addToolTip } } diff --git a/src/libs/qmljs/qmljsmodelmanagerinterface.cpp b/src/libs/qmljs/qmljsmodelmanagerinterface.cpp index d0d1d211382..34048e81850 100644 --- a/src/libs/qmljs/qmljsmodelmanagerinterface.cpp +++ b/src/libs/qmljs/qmljsmodelmanagerinterface.cpp @@ -977,16 +977,21 @@ void ModelManagerInterface::parseLoop(QSet &scannedPaths, } } #endif - // update snapshot. requires synchronization, but significantly reduces amount of file - // system queries for library imports because queries are cached in libraryInfo - const Snapshot snapshot = modelManager->snapshot(); - // get list of referenced files not yet in snapshot or in directories already scanned QStringList importedFiles; - findNewImplicitImports(doc, snapshot, &importedFiles, &scannedPaths); - findNewFileImports(doc, snapshot, &importedFiles, &scannedPaths); - findNewLibraryImports(doc, snapshot, modelManager, &importedFiles, &scannedPaths, - &newLibraries); + + // update snapshot. requires synchronization, but significantly reduces amount of file + // system queries for library imports because queries are cached in libraryInfo + { + // Make sure the snapshot is destroyed before updateDocument, so that we don't trigger + // the copy-on-write mechanism on its internals. + const Snapshot snapshot = modelManager->snapshot(); + + findNewImplicitImports(doc, snapshot, &importedFiles, &scannedPaths); + findNewFileImports(doc, snapshot, &importedFiles, &scannedPaths); + findNewLibraryImports(doc, snapshot, modelManager, &importedFiles, &scannedPaths, + &newLibraries); + } // add new files to parse list for (const QString &file : qAsConst(importedFiles)) { diff --git a/src/libs/utils/qtcprocess.cpp b/src/libs/utils/qtcprocess.cpp index 3f19153159e..2be8037d821 100644 --- a/src/libs/utils/qtcprocess.cpp +++ b/src/libs/utils/qtcprocess.cpp @@ -1256,7 +1256,6 @@ void QtcProcess::setStdOutCallback(const std::function & { d->m_stdOut.outputCallback = callback; d->m_stdOut.emitSingleLines = false; - d->m_stdOut.keepRawData = false; } void QtcProcess::setStdOutLineCallback(const std::function &callback) @@ -1270,7 +1269,6 @@ void QtcProcess::setStdErrCallback(const std::function & { d->m_stdErr.outputCallback = callback; d->m_stdErr.emitSingleLines = false; - d->m_stdErr.keepRawData = false; } void QtcProcess::setStdErrLineCallback(const std::function &callback) diff --git a/src/plugins/autotest/qtest/qttesttreeitem.cpp b/src/plugins/autotest/qtest/qttesttreeitem.cpp index 6655bec5095..d9a7baaf5f4 100644 --- a/src/plugins/autotest/qtest/qttesttreeitem.cpp +++ b/src/plugins/autotest/qtest/qttesttreeitem.cpp @@ -226,7 +226,7 @@ static void collectFailedTestInfo(TestTreeItem *item, QListtype() == TestTreeItem::TestCase, return); QStringList testCases; item->forFirstLevelChildren([&testCases](ITestTreeItem *func) { - if (func->data(0, FailedRole).toBool()) { + if (func->type() == TestTreeItem::TestFunction && func->data(0, FailedRole).toBool()) { testCases << func->name(); } else { func->forFirstLevelChildren([&testCases, func](ITestTreeItem *dataTag) { diff --git a/src/plugins/autotest/quick/quicktesttreeitem.cpp b/src/plugins/autotest/quick/quicktesttreeitem.cpp index e80432674ff..d47cac6c8e2 100644 --- a/src/plugins/autotest/quick/quicktesttreeitem.cpp +++ b/src/plugins/autotest/quick/quicktesttreeitem.cpp @@ -271,7 +271,7 @@ QList QuickTestTreeItem::getSelectedTestConfigurations() c QList QuickTestTreeItem::getFailedTestConfigurations() const { return testConfigurationsFor(this, [](TestTreeItem *it) { - return it->data(0, FailedRole).toBool(); + return it->data(0, FailedRole).toBool() && it->type() == TestTreeItem::TestFunction; }); } diff --git a/src/plugins/designer/qtcreatorintegration.cpp b/src/plugins/designer/qtcreatorintegration.cpp index 8ff73713605..7cc4a752c9b 100644 --- a/src/plugins/designer/qtcreatorintegration.cpp +++ b/src/plugins/designer/qtcreatorintegration.cpp @@ -393,12 +393,14 @@ void QtCreatorIntegration::slotNavigateToSlot(const QString &objectName, const Q // Build name of the class as generated by uic, insert Ui namespace // "foo::bar::form" -> "foo::bar::Ui::form" -static inline QString uiClassName(QString formObjectName) +static inline const QStringList uiClassNames(QString formObjectName) { const int indexOfScope = formObjectName.lastIndexOf("::"); const int uiNameSpaceInsertionPos = indexOfScope >= 0 ? indexOfScope + 2 : 0; + QString alt = formObjectName; formObjectName.insert(uiNameSpaceInsertionPos, "Ui::"); - return formObjectName; + alt.insert(uiNameSpaceInsertionPos, "Ui_"); + return {formObjectName, alt}; } static Document::Ptr getParsedDocument(const QString &fileName, @@ -486,28 +488,34 @@ bool QtCreatorIntegration::navigateToSlot(const QString &objectName, QDesignerFormWindowInterface *fwi = FormEditorW::activeWidgetHost()->formWindow(); - const QString uiClass = uiClassName(fwi->mainContainer()->objectName()); - - if (Designer::Constants::Internal::debug) - qDebug() << "Checking docs for " << uiClass; - - // Find the class definition (ui class defined as member or base class) - // in the file itself or in the directly included files (order 1). + QString uiClass; const Class *cl = nullptr; Document::Ptr declDoc; - for (const Document::Ptr &d : qAsConst(docMap)) { - LookupContext context(d, docTable); - const ClassDocumentPtrPair cd = findClassRecursively(context, uiClass, 1u); - if (cd.first) { - cl = cd.first; - declDoc = cd.second; + for (const QString &candidate : uiClassNames(fwi->mainContainer()->objectName())) { + if (Designer::Constants::Internal::debug) + qDebug() << "Checking docs for " << candidate; + + // Find the class definition (ui class defined as member or base class) + // in the file itself or in the directly included files (order 1). + for (const Document::Ptr &d : qAsConst(docMap)) { + LookupContext context(d, docTable); + const ClassDocumentPtrPair cd = findClassRecursively(context, candidate, 1u); + if (cd.first) { + cl = cd.first; + declDoc = cd.second; + break; + } + } + if (cl) { + uiClass = candidate; break; } + + if (errorMessage->isEmpty()) + *errorMessage = msgClassNotFound(candidate, docList); } - if (!cl) { - *errorMessage = msgClassNotFound(uiClass, docList); + if (!cl) return false; - } const QString functionName = "on_" + objectName + '_' + signalSignature; const QString functionNameWithParameterNames = addParameterNames(functionName, parameterNames); diff --git a/src/plugins/qbsprojectmanager/qbsprofilemanager.cpp b/src/plugins/qbsprojectmanager/qbsprofilemanager.cpp index 08e41558e82..1ac1ced79d6 100644 --- a/src/plugins/qbsprojectmanager/qbsprofilemanager.cpp +++ b/src/plugins/qbsprojectmanager/qbsprofilemanager.cpp @@ -237,6 +237,8 @@ QString QbsProfileManager::runQbsConfig(QbsConfigOp op, const QString &key, cons const QVariantMap props = value.toMap(); for (auto it = props.begin(); it != props.end(); ++it) args << it.key() << toJSLiteral(it.value()); + if (props.isEmpty()) // Make sure we still create a profile for "empty" kits. + args << "qbs.optimization" << toJSLiteral(QString("none")); break; } } diff --git a/src/plugins/qtsupport/baseqtversion.cpp b/src/plugins/qtsupport/baseqtversion.cpp index d958c63c805..a3fdb92ee61 100644 --- a/src/plugins/qtsupport/baseqtversion.cpp +++ b/src/plugins/qtsupport/baseqtversion.cpp @@ -1832,11 +1832,12 @@ bool BaseQtVersionPrivate::queryQMakeVariables(const FilePath &binary, const Env QByteArray output; output = runQmakeQuery(binary, env, error); - if (!output.startsWith('Q')) { // Is it always "QT_SYSROOT="? + if (!output.contains("QMAKE_VERSION:")) { // Some setups pass error messages via stdout, fooling the logic below. // Example with docker/qemu/arm "OCI runtime exec failed: exec failed: container_linux.go:367: // starting container process caused: exec: "/bin/qmake": stat /bin/qmake: no such file or directory" // Since we have a rough idea on what the output looks like we can work around this. + // Output does not always start with QT_SYSROOT, see QTCREATORBUG-26123. *error = QString::fromUtf8(output); return false; } diff --git a/src/plugins/remotelinux/makeinstallstep.cpp b/src/plugins/remotelinux/makeinstallstep.cpp index 7f3a880c4eb..5321683e4f0 100644 --- a/src/plugins/remotelinux/makeinstallstep.cpp +++ b/src/plugins/remotelinux/makeinstallstep.cpp @@ -103,15 +103,17 @@ MakeInstallStep::MakeInstallStep(BuildStepList *parent, Utils::Id id) : MakeStep customCommandLineAspect->makeCheckable(StringAspect::CheckBoxPlacement::Top, tr("Use custom command line instead:"), "RemoteLinux.MakeInstall.EnableCustomCommandLine"); - connect(customCommandLineAspect, &StringAspect::checkedChanged, - this, &MakeInstallStep::updateCommandFromAspect); - connect(customCommandLineAspect, &StringAspect::checkedChanged, - this, &MakeInstallStep::updateArgsFromAspect); - connect(customCommandLineAspect, &StringAspect::checkedChanged, - this, &MakeInstallStep::updateFromCustomCommandLineAspect); + const auto updateCommand = [this] { + updateCommandFromAspect(); + updateArgsFromAspect(); + updateFromCustomCommandLineAspect(); + }; + connect(customCommandLineAspect, &StringAspect::checkedChanged, this, updateCommand); connect(customCommandLineAspect, &StringAspect::changed, this, &MakeInstallStep::updateFromCustomCommandLineAspect); + connect(target(), &Target::buildSystemUpdated, this, updateCommand); + QTemporaryDir tmpDir; installRootAspect->setFilePath(FilePath::fromString(tmpDir.path())); const MakeInstallCommand cmd = target()->makeInstallCommand(tmpDir.path()); diff --git a/src/plugins/studiowelcome/studiowelcomeplugin.cpp b/src/plugins/studiowelcome/studiowelcomeplugin.cpp index 118962fec68..9601a9a1a70 100644 --- a/src/plugins/studiowelcome/studiowelcomeplugin.cpp +++ b/src/plugins/studiowelcome/studiowelcomeplugin.cpp @@ -333,11 +333,9 @@ bool StudioWelcomePlugin::initialize(const QStringList &arguments, QString *erro m_welcomeMode = new WelcomeMode; - if (!Utils::HostOsInfo::isWindowsHost()) { - QFontDatabase::addApplicationFont(":/studiofonts/TitilliumWeb-Regular.ttf"); - QFont systemFont("Titillium Web", QApplication::font().pointSize()); - QApplication::setFont(systemFont); - } + QFontDatabase::addApplicationFont(":/studiofonts/TitilliumWeb-Regular.ttf"); + QFont systemFont("Titillium Web", QApplication::font().pointSize()); + QApplication::setFont(systemFont); m_removeSplashTimer.setSingleShot(true); m_removeSplashTimer.setInterval(15000); diff --git a/src/shared/qbs b/src/shared/qbs index fe31e5b0b09..1d0a0a9c2af 160000 --- a/src/shared/qbs +++ b/src/shared/qbs @@ -1 +1 @@ -Subproject commit fe31e5b0b091c51270aaffc6f0c12eb7439c8183 +Subproject commit 1d0a0a9c2af318c8e3e7bd4be444854ab8f4ae34