aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-11-03 18:20:15 +0100
committerJ-P Nurmi <jpnurmi@qt.io>2016-11-03 19:20:42 +0100
commit6c88fe58a6037d252f40bf00aa5052b0f724a862 (patch)
tree9afdf0b638bc89e5e71eeac7b3c06ed53831e45b /src/imports
parent83cbe4e899d2d22e923bdc10e90f91ef106edf58 (diff)
parent3f646aca34c25f7cc36df2f988790bb238026422 (diff)
Merge remote-tracking branch 'origin/5.8' into dev
Conflicts: src/imports/controls/BusyIndicator.qml src/imports/controls/ProgressBar.qml src/quicktemplates2/qquickpopup.cpp src/quicktemplates2/qquickpopup_p_p.h src/quicktemplates2/qquickstackview.cpp Change-Id: I9a1028a991de9fc3e26d3f973106301e9ada631c
Diffstat (limited to 'src/imports')
-rw-r--r--src/imports/controls/BusyIndicator.qml2
-rw-r--r--src/imports/controls/Button.qml4
-rw-r--r--src/imports/controls/CheckBox.qml4
-rw-r--r--src/imports/controls/CheckDelegate.qml6
-rw-r--r--src/imports/controls/ComboBox.qml10
-rw-r--r--src/imports/controls/Dial.qml4
-rw-r--r--src/imports/controls/Drawer.qml7
-rw-r--r--src/imports/controls/Frame.qml2
-rw-r--r--src/imports/controls/GroupBox.qml4
-rw-r--r--src/imports/controls/ItemDelegate.qml4
-rw-r--r--src/imports/controls/Menu.qml4
-rw-r--r--src/imports/controls/MenuItem.qml6
-rw-r--r--src/imports/controls/Page.qml2
-rw-r--r--src/imports/controls/PageIndicator.qml4
-rw-r--r--src/imports/controls/Pane.qml2
-rw-r--r--src/imports/controls/ProgressBar.qml4
-rw-r--r--src/imports/controls/RadioButton.qml4
-rw-r--r--src/imports/controls/RadioDelegate.qml6
-rw-r--r--src/imports/controls/RangeSlider.qml6
-rw-r--r--src/imports/controls/ScrollBar.qml2
-rw-r--r--src/imports/controls/ScrollIndicator.qml2
-rw-r--r--src/imports/controls/Slider.qml4
-rw-r--r--src/imports/controls/SpinBox.qml10
-rw-r--r--src/imports/controls/StackView.qml12
-rw-r--r--src/imports/controls/SwipeDelegate.qml4
-rw-r--r--src/imports/controls/SwipeView.qml4
-rw-r--r--src/imports/controls/Switch.qml4
-rw-r--r--src/imports/controls/SwitchDelegate.qml6
-rw-r--r--src/imports/controls/TabBar.qml4
-rw-r--r--src/imports/controls/TabButton.qml4
-rw-r--r--src/imports/controls/TextField.qml2
-rw-r--r--src/imports/controls/ToolBar.qml2
-rw-r--r--src/imports/controls/ToolButton.qml4
-rw-r--r--src/imports/controls/ToolTip.qml4
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-busyindicator.gifbin3241 -> 17357 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-drawer.gifbin0 -> 55780 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-popup.pngbin0 -> 21693 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-popup.svg391
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-scrollbar-non-attached.pngbin0 -> 5459 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-scrollindicator-non-attached.pngbin0 -> 5280 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-swipeview.gifbin0 -> 35983 bytes
-rw-r--r--src/imports/controls/doc/images/qtquickcontrols2-toolbar.pngbin3358 -> 1186 bytes
-rw-r--r--src/imports/controls/doc/qtquickcontrols2.qdocconf1
-rw-r--r--src/imports/controls/doc/snippets/qtquickcontrols2-scrollbar-non-attached.qml93
-rw-r--r--src/imports/controls/doc/snippets/qtquickcontrols2-scrollindicator-non-attached.qml97
-rw-r--r--src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-toolbar.qml27
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-buttons.qdoc18
-rw-r--r--src/imports/controls/plugins.qmltypes19
-rw-r--r--src/imports/templates/plugins.qmltypes19
-rw-r--r--src/imports/templates/qtquicktemplates2plugin.cpp19
50 files changed, 667 insertions, 170 deletions
diff --git a/src/imports/controls/BusyIndicator.qml b/src/imports/controls/BusyIndicator.qml
index 16fb6091..d0b02350 100644
--- a/src/imports/controls/BusyIndicator.qml
+++ b/src/imports/controls/BusyIndicator.qml
@@ -47,7 +47,6 @@ T.BusyIndicator {
padding: 6
- //! [contentItem]
contentItem: BusyIndicatorImpl {
implicitWidth: 48
implicitHeight: 48
@@ -56,5 +55,4 @@ T.BusyIndicator {
visible: control.running || animator.running
Behavior on opacity { OpacityAnimator { id: animator; duration: 250 } }
}
- //! [contentItem]
}
diff --git a/src/imports/controls/Button.qml b/src/imports/controls/Button.qml
index 5410afa9..85d52b12 100644
--- a/src/imports/controls/Button.qml
+++ b/src/imports/controls/Button.qml
@@ -52,7 +52,6 @@ T.Button {
leftPadding: padding + 2
rightPadding: padding + 2
- //! [contentItem]
contentItem: Text {
text: control.text
font: control.font
@@ -64,9 +63,7 @@ T.Button {
verticalAlignment: Text.AlignVCenter
elide: Text.ElideRight
}
- //! [contentItem]
- //! [background]
background: Rectangle {
implicitWidth: 100
implicitHeight: 40
@@ -77,5 +74,4 @@ T.Button {
border.color: Default.focusColor
border.width: control.visualFocus ? 2 : 0
}
- //! [background]
}
diff --git a/src/imports/controls/CheckBox.qml b/src/imports/controls/CheckBox.qml
index 38614b6a..98fb31e1 100644
--- a/src/imports/controls/CheckBox.qml
+++ b/src/imports/controls/CheckBox.qml
@@ -52,15 +52,12 @@ T.CheckBox {
padding: 6
spacing: 6
- //! [indicator]
indicator: CheckIndicator {
x: text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2
y: control.topPadding + (control.availableHeight - height) / 2
control: control
}
- //! [indicator]
- //! [contentItem]
contentItem: Text {
leftPadding: control.indicator && !control.mirrored ? control.indicator.width + control.spacing : 0
rightPadding: control.indicator && control.mirrored ? control.indicator.width + control.spacing : 0
@@ -74,5 +71,4 @@ T.CheckBox {
verticalAlignment: Text.AlignVCenter
opacity: enabled ? 1 : 0.3
}
- //! [contentItem]
}
diff --git a/src/imports/controls/CheckDelegate.qml b/src/imports/controls/CheckDelegate.qml
index ad4bb44f..929dc4b5 100644
--- a/src/imports/controls/CheckDelegate.qml
+++ b/src/imports/controls/CheckDelegate.qml
@@ -52,7 +52,6 @@ T.CheckDelegate {
padding: 12
spacing: 12
- //! [contentItem]
contentItem: Text {
leftPadding: control.mirrored ? control.indicator.width + control.spacing : 0
rightPadding: !control.mirrored ? control.indicator.width + control.spacing : 0
@@ -65,23 +64,18 @@ T.CheckDelegate {
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
}
- //! [contentItem]
- //! [indicator]
indicator: CheckIndicator {
x: control.mirrored ? control.leftPadding : control.width - width - control.rightPadding
y: control.topPadding + (control.availableHeight - height) / 2
control: control
}
- //! [indicator]
- //! [background]
background: Rectangle {
implicitWidth: 100
implicitHeight: 40
visible: control.down || control.highlighted
color: control.down ? Default.delegatePressedColor : Default.delegateColor
}
- //! [background]
}
diff --git a/src/imports/controls/ComboBox.qml b/src/imports/controls/ComboBox.qml
index 46dc7525..a4e0f784 100644
--- a/src/imports/controls/ComboBox.qml
+++ b/src/imports/controls/ComboBox.qml
@@ -53,7 +53,6 @@ T.ComboBox {
leftPadding: padding + (!control.mirrored || !indicator || !indicator.visible ? 0 : indicator.width + spacing)
rightPadding: padding + (control.mirrored || !indicator || !indicator.visible ? 0 : indicator.width + spacing)
- //! [delegate]
delegate: ItemDelegate {
width: control.popup.width
text: control.textRole ? (Array.isArray(control.model) ? modelData[control.textRole] : model[control.textRole]) : modelData
@@ -61,9 +60,7 @@ T.ComboBox {
highlighted: control.highlightedIndex == index
hoverEnabled: control.hoverEnabled
}
- //! [delegate]
- //! [indicator]
indicator: Image {
x: control.mirrored ? control.padding : control.width - width - control.padding
y: control.topPadding + (control.availableHeight - height) / 2
@@ -72,9 +69,7 @@ T.ComboBox {
sourceSize.height: height
opacity: enabled ? 1 : 0.3
}
- //! [indicator]
- //! [contentItem]
contentItem: Text {
leftPadding: 12
rightPadding: 12
@@ -89,9 +84,7 @@ T.ComboBox {
elide: Text.ElideRight
opacity: enabled ? 1 : 0.3
}
- //! [contentItem]
- //! [background]
background: Rectangle {
implicitWidth: 120
implicitHeight: 40
@@ -102,9 +95,7 @@ T.ComboBox {
border.width: control.visualFocus ? 2 : 0
visible: !control.flat || control.pressed
}
- //! [background]
- //! [popup]
popup: T.Popup {
y: control.height - (control.visualFocus ? 0 : 1)
width: control.width
@@ -135,5 +126,4 @@ T.ComboBox {
background: Rectangle { }
}
- //! [popup]
}
diff --git a/src/imports/controls/Dial.qml b/src/imports/controls/Dial.qml
index e4579ca9..3e735c68 100644
--- a/src/imports/controls/Dial.qml
+++ b/src/imports/controls/Dial.qml
@@ -45,7 +45,6 @@ T.Dial {
implicitWidth: 184
implicitHeight: 184
- //! [background]
background: DialRing {
width: control.availableWidth
height: control.availableHeight
@@ -53,9 +52,7 @@ T.Dial {
progress: control.position
opacity: control.enabled ? 1 : 0.3
}
- //! [background]
- //! [handle]
handle: Image {
id: handleItem
x: background.x + background.width / 2 - handle.width / 2
@@ -78,5 +75,4 @@ T.Dial {
}
]
}
- //! [handle]
}
diff --git a/src/imports/controls/Drawer.qml b/src/imports/controls/Drawer.qml
index 90fef012..a90893d9 100644
--- a/src/imports/controls/Drawer.qml
+++ b/src/imports/controls/Drawer.qml
@@ -55,15 +55,9 @@ T.Drawer {
rightPadding: control.edge === Qt.LeftEdge
bottomPadding: control.edge === Qt.TopEdge
- //! [enter]
enter: Transition { SmoothedAnimation { velocity: 5 } }
- //! [enter]
-
- //! [exit]
exit: Transition { SmoothedAnimation { velocity: 5 } }
- //! [exit]
- //! [background]
background: Rectangle {
Rectangle {
readonly property bool horizontal: control.edge === Qt.LeftEdge || control.edge === Qt.RightEdge
@@ -74,5 +68,4 @@ T.Drawer {
y: control.edge === Qt.TopEdge ? parent.height - 1 : 0
}
}
- //! [background]
}
diff --git a/src/imports/controls/Frame.qml b/src/imports/controls/Frame.qml
index eae1f25d..6086d92b 100644
--- a/src/imports/controls/Frame.qml
+++ b/src/imports/controls/Frame.qml
@@ -50,10 +50,8 @@ T.Frame {
padding: 12
- //! [background]
background: Rectangle {
color: "transparent"
border.color: Default.frameLightColor
}
- //! [background]
}
diff --git a/src/imports/controls/GroupBox.qml b/src/imports/controls/GroupBox.qml
index a761c8dc..4f083b15 100644
--- a/src/imports/controls/GroupBox.qml
+++ b/src/imports/controls/GroupBox.qml
@@ -54,7 +54,6 @@ T.GroupBox {
padding: 12
topPadding: padding + (label && label.implicitWidth > 0 ? label.implicitHeight + spacing : 0)
- //! [label]
label: Text {
x: control.leftPadding
width: control.availableWidth
@@ -66,9 +65,7 @@ T.GroupBox {
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
}
- //! [label]
- //! [background]
background: Rectangle {
y: control.topPadding - control.padding
width: parent.width
@@ -77,5 +74,4 @@ T.GroupBox {
color: "transparent"
border.color: Default.frameLightColor
}
- //! [background]
}
diff --git a/src/imports/controls/ItemDelegate.qml b/src/imports/controls/ItemDelegate.qml
index a1bf9b22..23d72080 100644
--- a/src/imports/controls/ItemDelegate.qml
+++ b/src/imports/controls/ItemDelegate.qml
@@ -52,7 +52,6 @@ T.ItemDelegate {
padding: 12
spacing: 12
- //! [contentItem]
contentItem: Text {
leftPadding: control.mirrored ? (control.indicator ? control.indicator.width : 0) + control.spacing : 0
rightPadding: !control.mirrored ? (control.indicator ? control.indicator.width : 0) + control.spacing : 0
@@ -65,9 +64,7 @@ T.ItemDelegate {
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
}
- //! [contentItem]
- //! [background]
background: Rectangle {
implicitWidth: 100
implicitHeight: 40
@@ -76,5 +73,4 @@ T.ItemDelegate {
? (control.pressed ? Default.focusPressedColor : Default.delegateFocusColor)
: (control.down ? Default.delegatePressedColor : Default.delegateColor)
}
- //! [background]
}
diff --git a/src/imports/controls/Menu.qml b/src/imports/controls/Menu.qml
index 0461b2b6..e449f6d1 100644
--- a/src/imports/controls/Menu.qml
+++ b/src/imports/controls/Menu.qml
@@ -49,7 +49,6 @@ T.Menu {
margins: 0
- //! [contentItem]
contentItem: ListView {
implicitHeight: contentHeight
model: control.contentModel
@@ -61,14 +60,11 @@ T.Menu {
ScrollIndicator.vertical: ScrollIndicator {}
}
- //! [contentItem]
- //! [background]
background: Rectangle {
implicitWidth: 200
implicitHeight: 40
color: Default.backgroundColor
border.color: Default.frameDarkColor
}
- //! [background]
}
diff --git a/src/imports/controls/MenuItem.qml b/src/imports/controls/MenuItem.qml
index 0d4b609d..cd224393 100644
--- a/src/imports/controls/MenuItem.qml
+++ b/src/imports/controls/MenuItem.qml
@@ -51,7 +51,6 @@ T.MenuItem {
padding: 6
- //! [contentItem]
contentItem: Text {
leftPadding: control.checkable && !control.mirrored ? control.indicator.width + control.spacing : 0
rightPadding: control.checkable && control.mirrored ? control.indicator.width + control.spacing : 0
@@ -64,9 +63,7 @@ T.MenuItem {
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
}
- //! [contentItem]
- //! [indicator]
indicator: Image {
x: control.mirrored ? control.width - width - control.rightPadding : control.leftPadding
y: control.topPadding + (control.availableHeight - height) / 2
@@ -74,9 +71,7 @@ T.MenuItem {
visible: control.checked
source: control.checkable ? "qrc:/qt-project.org/imports/QtQuick/Controls.2/images/check.png" : ""
}
- //! [indicator]
- //! [background]
background: Item {
implicitWidth: 200
implicitHeight: 40
@@ -89,5 +84,4 @@ T.MenuItem {
color: control.visualFocus || control.down ? Default.delegateColor : "transparent"
}
}
- //! [background]
}
diff --git a/src/imports/controls/Page.qml b/src/imports/controls/Page.qml
index edd8d628..02f81e07 100644
--- a/src/imports/controls/Page.qml
+++ b/src/imports/controls/Page.qml
@@ -54,9 +54,7 @@ T.Page {
contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0)
contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)
- //! [background]
background: Rectangle {
color: Default.backgroundColor
}
- //! [background]
}
diff --git a/src/imports/controls/PageIndicator.qml b/src/imports/controls/PageIndicator.qml
index b546a9cc..0273af98 100644
--- a/src/imports/controls/PageIndicator.qml
+++ b/src/imports/controls/PageIndicator.qml
@@ -50,7 +50,6 @@ T.PageIndicator {
padding: 6
spacing: 6
- //! [delegate]
delegate: Rectangle {
implicitWidth: 8
implicitHeight: 8
@@ -61,9 +60,7 @@ T.PageIndicator {
opacity: index === currentIndex ? 0.95 : pressed ? 0.7 : 0.45
Behavior on opacity { OpacityAnimator { duration: 100 } }
}
- //! [delegate]
- //! [contentItem]
contentItem: Row {
spacing: control.spacing
@@ -72,5 +69,4 @@ T.PageIndicator {
delegate: control.delegate
}
}
- //! [contentItem]
}
diff --git a/src/imports/controls/Pane.qml b/src/imports/controls/Pane.qml
index 482ec18b..2aeeee5d 100644
--- a/src/imports/controls/Pane.qml
+++ b/src/imports/controls/Pane.qml
@@ -50,9 +50,7 @@ T.Pane {
padding: 12
- //! [background]
background: Rectangle {
color: Default.backgroundColor
}
- //! [background]
}
diff --git a/src/imports/controls/ProgressBar.qml b/src/imports/controls/ProgressBar.qml
index 130adcec..0f4029cf 100644
--- a/src/imports/controls/ProgressBar.qml
+++ b/src/imports/controls/ProgressBar.qml
@@ -47,7 +47,6 @@ T.ProgressBar {
implicitHeight: Math.max(background ? background.implicitHeight : 0,
contentItem.implicitHeight + topPadding + bottomPadding)
- //! [contentItem]
contentItem: ProgressBarImpl {
implicitHeight: 6
implicitWidth: 116
@@ -55,9 +54,7 @@ T.ProgressBar {
progress: control.position
indeterminate: control.visible && control.indeterminate
}
- //! [contentItem]
- //! [background]
background: Rectangle {
implicitWidth: 200
implicitHeight: 6
@@ -68,5 +65,4 @@ T.ProgressBar {
color: Default.progressBarColor
}
- //! [background]
}
diff --git a/src/imports/controls/RadioButton.qml b/src/imports/controls/RadioButton.qml
index 65c9328b..35395d85 100644
--- a/src/imports/controls/RadioButton.qml
+++ b/src/imports/controls/RadioButton.qml
@@ -52,15 +52,12 @@ T.RadioButton {
padding: 6
spacing: 6
- //! [indicator]
indicator: RadioIndicator {
x: text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2
y: control.topPadding + (control.availableHeight - height) / 2
control: control
}
- //! [indicator]
- //! [contentItem]
contentItem: Text {
leftPadding: control.indicator && !control.mirrored ? control.indicator.width + control.spacing : 0
rightPadding: control.indicator && control.mirrored ? control.indicator.width + control.spacing : 0
@@ -74,5 +71,4 @@ T.RadioButton {
verticalAlignment: Text.AlignVCenter
opacity: enabled ? 1 : 0.3
}
- //! [contentItem]
}
diff --git a/src/imports/controls/RadioDelegate.qml b/src/imports/controls/RadioDelegate.qml
index 85e66aa0..5df649d9 100644
--- a/src/imports/controls/RadioDelegate.qml
+++ b/src/imports/controls/RadioDelegate.qml
@@ -52,7 +52,6 @@ T.RadioDelegate {
padding: 12
spacing: 12
- //! [contentItem]
contentItem: Text {
leftPadding: control.mirrored ? control.indicator.width + control.spacing : 0
rightPadding: !control.mirrored ? control.indicator.width + control.spacing : 0
@@ -65,23 +64,18 @@ T.RadioDelegate {
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
}
- //! [contentItem]
- //! [indicator]
indicator: RadioIndicator {
x: control.mirrored ? control.leftPadding : control.width - width - control.rightPadding
y: control.topPadding + (control.availableHeight - height) / 2
control: control
}
- //! [indicator]
- //! [background]
background: Rectangle {
implicitWidth: 100
implicitHeight: 40
visible: control.down || control.highlighted
color: control.down ? Default.delegatePressedColor : Default.delegateColor
}
- //! [background]
}
diff --git a/src/imports/controls/RangeSlider.qml b/src/imports/controls/RangeSlider.qml
index 4eefe8e1..18408e7c 100644
--- a/src/imports/controls/RangeSlider.qml
+++ b/src/imports/controls/RangeSlider.qml
@@ -51,7 +51,6 @@ T.RangeSlider {
padding: 6
- //! [firstHandle]
first.handle: Rectangle {
x: control.leftPadding + (horizontal ? control.first.visualPosition * (control.availableWidth - width) : (control.availableWidth - width) / 2)
y: control.topPadding + (horizontal ? (control.availableHeight - height) / 2 : control.first.visualPosition * (control.availableHeight - height))
@@ -68,9 +67,7 @@ T.RangeSlider {
readonly property bool horizontal: control.orientation === Qt.Horizontal
}
- //! [firstHandle]
- //! [secondHandle]
second.handle: Rectangle {
x: control.leftPadding + (horizontal ? control.second.visualPosition * (control.availableWidth - width) : (control.availableWidth - width) / 2)
y: control.topPadding + (horizontal ? (control.availableHeight - height) / 2 : control.second.visualPosition * (control.availableHeight - height))
@@ -87,9 +84,7 @@ T.RangeSlider {
readonly property bool horizontal: control.orientation === Qt.Horizontal
}
- //! [secondHandle]
- //! [background]
background: Rectangle {
x: control.leftPadding + (horizontal ? 0 : (control.availableWidth - width) / 2)
y: control.topPadding + (horizontal ? (control.availableHeight - height) / 2 : 0)
@@ -103,5 +98,4 @@ T.RangeSlider {
readonly property bool horizontal: control.orientation === Qt.Horizontal
}
- //! [background]
}
diff --git a/src/imports/controls/ScrollBar.qml b/src/imports/controls/ScrollBar.qml
index fcca30e8..52ec1995 100644
--- a/src/imports/controls/ScrollBar.qml
+++ b/src/imports/controls/ScrollBar.qml
@@ -49,7 +49,6 @@ T.ScrollBar {
padding: 2
- //! [contentItem]
contentItem: Rectangle {
id: handle
@@ -75,5 +74,4 @@ T.ScrollBar {
}
}
}
- //! [contentItem]
}
diff --git a/src/imports/controls/ScrollIndicator.qml b/src/imports/controls/ScrollIndicator.qml
index 50f58575..8ef60ed6 100644
--- a/src/imports/controls/ScrollIndicator.qml
+++ b/src/imports/controls/ScrollIndicator.qml
@@ -49,7 +49,6 @@ T.ScrollIndicator {
padding: 2
- //! [contentItem]
contentItem: Rectangle {
id: indicator
@@ -76,5 +75,4 @@ T.ScrollIndicator {
}
]
}
- //! [contentItem]
}
diff --git a/src/imports/controls/Slider.qml b/src/imports/controls/Slider.qml
index 3564c3ae..c95e3f7b 100644
--- a/src/imports/controls/Slider.qml
+++ b/src/imports/controls/Slider.qml
@@ -49,7 +49,6 @@ T.Slider {
padding: 6
- //! [handle]
handle: Rectangle {
x: control.leftPadding + (horizontal ? control.visualPosition * (control.availableWidth - width) : (control.availableWidth - width) / 2)
y: control.topPadding + (horizontal ? (control.availableHeight - height) / 2 : control.visualPosition * (control.availableHeight - height))
@@ -66,9 +65,7 @@ T.Slider {
readonly property bool horizontal: control.orientation === Qt.Horizontal
}
- //! [handle]
- //! [background]
background: Rectangle {
x: control.leftPadding + (horizontal ? 0 : (control.availableWidth - width) / 2)
y: control.topPadding + (horizontal ? (control.availableHeight - height) / 2 : 0)
@@ -82,5 +79,4 @@ T.Slider {
readonly property bool horizontal: control.orientation === Qt.Horizontal
}
- //! [background]
}
diff --git a/src/imports/controls/SpinBox.qml b/src/imports/controls/SpinBox.qml
index b9e2199e..6a564d6e 100644
--- a/src/imports/controls/SpinBox.qml
+++ b/src/imports/controls/SpinBox.qml
@@ -56,15 +56,12 @@ T.SpinBox {
leftPadding: padding + (control.mirrored ? (up.indicator ? up.indicator.width : 0) : (down.indicator ? down.indicator.width : 0))
rightPadding: padding + (control.mirrored ? (down.indicator ? down.indicator.width : 0) : (up.indicator ? up.indicator.width : 0))
- //! [validator]
validator: IntValidator {
locale: control.locale.name
bottom: Math.min(control.from, control.to)
top: Math.max(control.from, control.to)
}
- //! [validator]
- //! [contentItem]
contentItem: TextInput {
z: 2
text: control.textFromValue(control.value, control.locale)
@@ -92,9 +89,7 @@ T.SpinBox {
border.width: 2
}
}
- //! [contentItem]
- //! [up.indicator]
up.indicator: Rectangle {
x: control.mirrored ? 0 : parent.width - width
height: parent.height
@@ -117,9 +112,7 @@ T.SpinBox {
color: enabled ? Default.textColor : Default.textDisabledColor
}
}
- //! [up.indicator]
- //! [down.indicator]
down.indicator: Rectangle {
x: control.mirrored ? parent.width - width : 0
height: parent.height
@@ -135,12 +128,9 @@ T.SpinBox {
color: enabled ? Default.textColor : Default.textDisabledColor
}
}
- //! [down.indicator]
- //! [background]
background: Rectangle {
implicitWidth: 140
border.color: Default.buttonColor
}
- //! [background]
}
diff --git a/src/imports/controls/StackView.qml b/src/imports/controls/StackView.qml
index 93e4503f..96120d2b 100644
--- a/src/imports/controls/StackView.qml
+++ b/src/imports/controls/StackView.qml
@@ -41,39 +41,27 @@ import QtQuick.Templates 2.1 as T
T.StackView {
id: control
- //! [popEnter]
popEnter: Transition {
XAnimator { from: (control.mirrored ? -1 : 1) * -control.width; to: 0; duration: 400; easing.type: Easing.OutCubic }
}
- //! [popEnter]
- //! [popExit]
popExit: Transition {
XAnimator { from: 0; to: (control.mirrored ? -1 : 1) * control.width; duration: 400; easing.type: Easing.OutCubic }
}
- //! [popExit]
- //! [pushEnter]
pushEnter: Transition {
XAnimator { from: (control.mirrored ? -1 : 1) * control.width; to: 0; duration: 400; easing.type: Easing.OutCubic }
}
- //! [pushEnter]
- //! [pushExit]
pushExit: Transition {
XAnimator { from: 0; to: (control.mirrored ? -1 : 1) * -control.width; duration: 400; easing.type: Easing.OutCubic }
}
- //! [pushExit]
- //! [replaceEnter]
replaceEnter: Transition {
XAnimator { from: (control.mirrored ? -1 : 1) * control.width; to: 0; duration: 400; easing.type: Easing.OutCubic }
}
- //! [replaceEnter]
- //! [replaceExit]
replaceExit: Transition {
XAnimator { from: 0; to: (control.mirrored ? -1 : 1) * -control.width; duration: 400; easing.type: Easing.OutCubic }
}
- //! [replaceExit]
}
diff --git a/src/imports/controls/SwipeDelegate.qml b/src/imports/controls/SwipeDelegate.qml
index 8b9c9f2f..b140eb95 100644
--- a/src/imports/controls/SwipeDelegate.qml
+++ b/src/imports/controls/SwipeDelegate.qml
@@ -52,7 +52,6 @@ T.SwipeDelegate {
padding: 12
spacing: 12
- //! [contentItem]
contentItem: Text {
leftPadding: control.mirrored ? (control.indicator ? control.indicator.width : 0) + control.spacing : 0
rightPadding: !control.mirrored ? (control.indicator ? control.indicator.width : 0) + control.spacing : 0
@@ -73,9 +72,7 @@ T.SwipeDelegate {
}
}
}
- //! [contentItem]
- //! [background]
background: Rectangle {
color: control.visualFocus
? (control.down ? Default.focusPressedColor : Default.delegateFocusColor)
@@ -89,5 +86,4 @@ T.SwipeDelegate {
}
}
}
- //! [background]
}
diff --git a/src/imports/controls/SwipeView.qml b/src/imports/controls/SwipeView.qml
index cd026f7c..555775ee 100644
--- a/src/imports/controls/SwipeView.qml
+++ b/src/imports/controls/SwipeView.qml
@@ -46,9 +46,6 @@ T.SwipeView {
implicitHeight: Math.max(background ? background.implicitHeight : 0,
contentItem.implicitHeight + topPadding + bottomPadding)
- Accessible.role: Accessible.PageTabList
-
- //! [contentItem]
contentItem: ListView {
model: control.contentModel
interactive: control.interactive
@@ -64,5 +61,4 @@ T.SwipeView {
preferredHighlightEnd: 0
highlightMoveDuration: 250
}
- //! [contentItem]
}
diff --git a/src/imports/controls/Switch.qml b/src/imports/controls/Switch.qml
index 16f2744f..1918189a 100644
--- a/src/imports/controls/Switch.qml
+++ b/src/imports/controls/Switch.qml
@@ -52,15 +52,12 @@ T.Switch {
padding: 6
spacing: 6
- //! [indicator]
indicator: SwitchIndicator {
x: text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2
y: control.topPadding + (control.availableHeight - height) / 2
control: control
}
- //! [indicator]
- //! [contentItem]
contentItem: Text {
leftPadding: control.indicator && !control.mirrored ? control.indicator.width + control.spacing : 0
rightPadding: control.indicator && control.mirrored ? control.indicator.width + control.spacing : 0
@@ -73,5 +70,4 @@ T.Switch {
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
}
- //! [contentItem]
}
diff --git a/src/imports/controls/SwitchDelegate.qml b/src/imports/controls/SwitchDelegate.qml
index 8f2af81c..a030ec07 100644
--- a/src/imports/controls/SwitchDelegate.qml
+++ b/src/imports/controls/SwitchDelegate.qml
@@ -52,15 +52,12 @@ T.SwitchDelegate {
padding: 12
spacing: 12
- //! [indicator]
indicator: SwitchIndicator {
x: text ? (control.mirrored ? control.leftPadding : control.width - width - control.rightPadding) : control.leftPadding + (control.availableWidth - width) / 2
y: control.topPadding + (control.availableHeight - height) / 2
control: control
}
- //! [indicator]
- //! [contentItem]
contentItem: Text {
leftPadding: control.indicator && !control.mirrored ? 0 : control.indicator.width + control.spacing
rightPadding: control.indicator && control.mirrored ? 0 : control.indicator.width + control.spacing
@@ -73,14 +70,11 @@ T.SwitchDelegate {
horizontalAlignment: Text.AlignLeft
verticalAlignment: Text.AlignVCenter
}
- //! [contentItem]
- //! [background]
background: Rectangle {
implicitWidth: 100
implicitHeight: 40
visible: control.down || control.highlighted
color: control.down ? Default.delegatePressedColor : Default.delegateColor
}
- //! [background]
}
diff --git a/src/imports/controls/TabBar.qml b/src/imports/controls/TabBar.qml
index 8b23c94a..21358c39 100644
--- a/src/imports/controls/TabBar.qml
+++ b/src/imports/controls/TabBar.qml
@@ -47,7 +47,6 @@ T.TabBar {
spacing: 1
- //! [contentItem]
contentItem: ListView {
implicitWidth: contentWidth
implicitHeight: 40
@@ -66,9 +65,6 @@ T.TabBar {
preferredHighlightBegin: 40
preferredHighlightEnd: width - 40
}
- //! [contentItem]
- //! [background]
background: Rectangle { }
- //! [background]
}
diff --git a/src/imports/controls/TabButton.qml b/src/imports/controls/TabButton.qml
index 824c2737..f0d922a1 100644
--- a/src/imports/controls/TabButton.qml
+++ b/src/imports/controls/TabButton.qml
@@ -50,7 +50,6 @@ T.TabButton {
padding: 6
- //! [contentItem]
contentItem: Text {
text: control.text
font: control.font
@@ -60,14 +59,11 @@ T.TabButton {
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
- //! [contentItem]
- //! [background]
background: Rectangle {
implicitHeight: 40
color: control.down
? (control.checked ? Default.tabButtonCheckedPressedColor : Default.tabButtonPressedColor)
: (control.checked ? "transparent" : Default.tabButtonColor)
}
- //! [background]
}
diff --git a/src/imports/controls/TextField.qml b/src/imports/controls/TextField.qml
index e58b94c0..5e6e91b6 100644
--- a/src/imports/controls/TextField.qml
+++ b/src/imports/controls/TextField.qml
@@ -74,7 +74,6 @@ T.TextField {
elide: Text.ElideRight
}
- //! [background]
background: Rectangle {
implicitWidth: 200
implicitHeight: 40
@@ -82,5 +81,4 @@ T.TextField {
color: control.enabled ? Default.backgroundColor : Default.disabledDarkColor
border.color: control.activeFocus ? Default.focusColor : (control.enabled ? Default.disabledLightColor : "transparent")
}
- //! [background]
}
diff --git a/src/imports/controls/ToolBar.qml b/src/imports/controls/ToolBar.qml
index f5e5076c..d7c29be7 100644
--- a/src/imports/controls/ToolBar.qml
+++ b/src/imports/controls/ToolBar.qml
@@ -48,10 +48,8 @@ T.ToolBar {
contentWidth: contentItem.implicitWidth || (contentChildren.length === 1 ? contentChildren[0].implicitWidth : 0)
contentHeight: contentItem.implicitHeight || (contentChildren.length === 1 ? contentChildren[0].implicitHeight : 0)
- //! [background]
background: Rectangle {
implicitHeight: 40
color: Default.delegateColor
}
- //! [background]
}
diff --git a/src/imports/controls/ToolButton.qml b/src/imports/controls/ToolButton.qml
index f92845f8..8d91da10 100644
--- a/src/imports/controls/ToolButton.qml
+++ b/src/imports/controls/ToolButton.qml
@@ -50,7 +50,6 @@ T.ToolButton {
padding: 6
- //! [contentItem]
contentItem: Text {
text: control.text
font: control.font
@@ -59,9 +58,7 @@ T.ToolButton {
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
- //! [contentItem]
- //! [background]
background: Rectangle {
implicitWidth: 40
implicitHeight: 40
@@ -70,5 +67,4 @@ T.ToolButton {
opacity: control.down ? 1.0 : control.enabled && (control.checked || control.highlighted) ? 0.5 : 0
visible: control.down || (control.enabled && (control.checked || control.highlighted))
}
- //! [background]
}
diff --git a/src/imports/controls/ToolTip.qml b/src/imports/controls/ToolTip.qml
index 783dc224..bf574c28 100644
--- a/src/imports/controls/ToolTip.qml
+++ b/src/imports/controls/ToolTip.qml
@@ -55,17 +55,13 @@ T.ToolTip {
closePolicy: T.Popup.CloseOnEscape | T.Popup.CloseOnPressOutsideParent | T.Popup.CloseOnReleaseOutsideParent
- //! [contentItem]
contentItem: Text {
text: control.text
font: control.font
// TODO: wrapMode: Label.Wrap
}
- //! [contentItem]
- //! [background]
background: Rectangle {
border.color: Default.frameDarkColor
}
- //! [background]
}
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-busyindicator.gif b/src/imports/controls/doc/images/qtquickcontrols2-busyindicator.gif
index 31ab2d1c..653d200f 100644
--- a/src/imports/controls/doc/images/qtquickcontrols2-busyindicator.gif
+++ b/src/imports/controls/doc/images/qtquickcontrols2-busyindicator.gif
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-drawer.gif b/src/imports/controls/doc/images/qtquickcontrols2-drawer.gif
new file mode 100644
index 00000000..736f34f6
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-drawer.gif
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-popup.png b/src/imports/controls/doc/images/qtquickcontrols2-popup.png
new file mode 100644
index 00000000..4514948d
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-popup.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-popup.svg b/src/imports/controls/doc/images/qtquickcontrols2-popup.svg
new file mode 100644
index 00000000..1d78addf
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-popup.svg
@@ -0,0 +1,391 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="679.31317"
+ height="357.84125"
+ viewBox="0 0 679.31314 357.84124"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ sodipodi:docname="qtquickcontrols2-popup.svg"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90">
+ <defs
+ id="defs4">
+ <marker
+ inkscape:stockid="TriangleOutL"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="TriangleOutL"
+ style="overflow:visible"
+ inkscape:isstock="true">
+ <path
+ id="path4327"
+ d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+ transform="scale(0.8,0.8)"
+ inkscape:connector-curvature="0" />
+ </marker>
+ <marker
+ inkscape:stockid="TriangleInL"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="TriangleInL"
+ style="overflow:visible"
+ inkscape:isstock="true">
+ <path
+ id="path4318"
+ d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+ transform="scale(-0.8,-0.8)"
+ inkscape:connector-curvature="0" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow1Mstart"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow1Mstart"
+ style="overflow:visible"
+ inkscape:isstock="true">
+ <path
+ id="path4191"
+ d="M 0,0 5,-5 -12.5,0 5,5 0,0 Z"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+ transform="matrix(0.4,0,0,0.4,4,0)"
+ inkscape:connector-curvature="0" />
+ </marker>
+ <marker
+ inkscape:stockid="Arrow2Mend"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="Arrow2Mend"
+ style="overflow:visible"
+ inkscape:isstock="true">
+ <path
+ id="path4212"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
+ d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z"
+ transform="scale(-0.6,-0.6)"
+ inkscape:connector-curvature="0" />
+ </marker>
+ <marker
+ inkscape:stockid="TriangleInL"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="TriangleInL-2"
+ style="overflow:visible"
+ inkscape:isstock="true">
+ <path
+ inkscape:connector-curvature="0"
+ id="path4318-4"
+ d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+ transform="scale(-0.8,-0.8)" />
+ </marker>
+ <marker
+ inkscape:stockid="TriangleOutL"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="TriangleOutL-9"
+ style="overflow:visible"
+ inkscape:isstock="true">
+ <path
+ inkscape:connector-curvature="0"
+ id="path4327-1"
+ d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+ transform="scale(0.8,0.8)" />
+ </marker>
+ <marker
+ inkscape:stockid="TriangleInL"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="TriangleInL-3"
+ style="overflow:visible"
+ inkscape:isstock="true">
+ <path
+ id="path4318-9"
+ d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+ transform="scale(-0.8,-0.8)"
+ inkscape:connector-curvature="0" />
+ </marker>
+ <marker
+ inkscape:stockid="TriangleOutL"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="TriangleOutL-0"
+ style="overflow:visible"
+ inkscape:isstock="true">
+ <path
+ id="path4327-5"
+ d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+ transform="scale(0.8,0.8)"
+ inkscape:connector-curvature="0" />
+ </marker>
+ <marker
+ inkscape:stockid="TriangleInL"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="TriangleInL-9"
+ style="overflow:visible"
+ inkscape:isstock="true">
+ <path
+ id="path4318-2"
+ d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+ transform="scale(-0.8,-0.8)"
+ inkscape:connector-curvature="0" />
+ </marker>
+ <marker
+ inkscape:stockid="TriangleOutL"
+ orient="auto"
+ refY="0"
+ refX="0"
+ id="TriangleOutL-1"
+ style="overflow:visible"
+ inkscape:isstock="true">
+ <path
+ id="path4327-2"
+ d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1pt;stroke-opacity:1"
+ transform="scale(0.8,0.8)"
+ inkscape:connector-curvature="0" />
+ </marker>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="1.4"
+ inkscape:cx="359.69451"
+ inkscape:cy="143.84745"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ fit-margin-top="0"
+ fit-margin-left="0"
+ fit-margin-right="0"
+ fit-margin-bottom="0"
+ units="px" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(91.482322,-255.11685)">
+ <rect
+ style="fill:#cccccc;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4136"
+ width="564.41473"
+ height="248.82799"
+ x="-30.289024"
+ y="321.69858" />
+ <flowRoot
+ xml:space="preserve"
+ id="flowRoot4138"
+ style="font-style:normal;font-weight:normal;font-size:15.41801071px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ transform="matrix(1.1690183,0,0,1.1690183,19.800223,-141.31953)"><flowRegion
+ id="flowRegion4140"><rect
+ id="rect4142"
+ width="129.78784"
+ height="31.668232"
+ x="-34.519978"
+ y="400.22751"
+ style="font-size:15.41801071px;fill:#000000" /></flowRegion><flowPara
+ id="flowPara4144"
+ style="font-size:20.55734825px;fill:#000000">Background</flowPara><flowPara
+ id="flowPara4146" /></flowRoot> <rect
+ style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:27.60000038;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.58381503"
+ id="rect4148"
+ width="464.22452"
+ height="165.94499"
+ x="18.895706"
+ y="364.74274" />
+ <flowRoot
+ xml:space="preserve"
+ id="flowRoot4138-6"
+ style="font-style:normal;font-weight:normal;font-size:40px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ transform="matrix(0.6007979,0,0,0.6007979,144.03104,146.23557)"><flowRegion
+ id="flowRegion4140-6"><rect
+ id="rect4142-6"
+ width="334.36047"
+ height="80.812172"
+ x="42.426407"
+ y="481.62601"
+ style="font-size:40px;fill:#000000" /></flowRegion><flowPara
+ id="flowPara4146-6">Content item</flowPara></flowRoot> <path
+ style="fill:#000000;fill-rule:evenodd;stroke:#000000;stroke-width:1.04880464;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#TriangleInL);marker-end:url(#TriangleOutL)"
+ d="m 27.018805,516.90108 0,-133.62042"
+ id="path4179"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.93839902;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#TriangleInL-2);marker-end:url(#TriangleOutL-9)"
+ d="m 26.776662,538.68728 451.028788,0"
+ id="path4179-7"
+ inkscape:connector-curvature="0" />
+ <flowRoot
+ xml:space="preserve"
+ id="flowRoot4138-6-2"
+ style="font-style:normal;font-weight:normal;font-size:20px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ transform="matrix(0.6007979,0,0,0.6007979,10.003309,144.31674)"><flowRegion
+ id="flowRegion4140-6-6"><rect
+ id="rect4142-6-1"
+ width="117.17769"
+ height="101.01524"
+ x="42.426407"
+ y="481.62601"
+ style="font-size:20px;fill:#000000" /></flowRegion><flowPara
+ id="flowPara9732"
+ style="font-size:17.5px;fill:#000000">Available height</flowPara></flowRoot> <flowRoot
+ xml:space="preserve"
+ id="flowRoot4138-6-2-7"
+ style="font-style:normal;font-weight:normal;font-size:17.5px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ transform="matrix(0.6007979,0,0,0.6007979,10.811464,253.07573)"><flowRegion
+ id="flowRegion4140-6-6-4"><rect
+ id="rect4142-6-1-4"
+ width="252.53812"
+ height="61.619293"
+ x="42.426407"
+ y="481.62601"
+ style="font-size:17.5px;fill:#000000" /></flowRegion><flowPara
+ style="font-size:17.5px;fill:#000000"
+ id="flowPara10048">Available width</flowPara></flowRoot> <flowRoot
+ xml:space="preserve"
+ id="flowRoot4138-6-1"
+ style="font-style:normal;font-weight:normal;font-size:25px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ transform="matrix(0.6007979,0,0,0.6007979,210.99354,300.96896)"><flowRegion
+ id="flowRegion4140-6-9"><rect
+ id="rect4142-6-0"
+ width="270.72089"
+ height="68.690361"
+ x="42.426407"
+ y="481.62601"
+ style="font-size:25px;fill:#000000" /></flowRegion><flowPara
+ id="flowPara4146-6-2"
+ style="font-size:17.5px">Width</flowPara></flowRoot> <path
+ style="fill:#000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.90119678;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#TriangleInL-3);marker-end:url(#TriangleOutL-0)"
+ d="m -26.522148,583.27143 557.292688,0"
+ id="path4179-8"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:#000000;fill-rule:evenodd;stroke:#000000;stroke-width:0.9011969;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-start:url(#TriangleInL-9);marker-end:url(#TriangleOutL-1)"
+ d="m -43.461661,566.30584 0,-239.7552"
+ id="path4179-9"
+ inkscape:connector-curvature="0" />
+ <flowRoot
+ xml:space="preserve"
+ id="flowRoot4138-6-1-7"
+ style="font-style:normal;font-weight:normal;font-size:17.5px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ transform="matrix(0.6007979,0,0,0.6007979,-112.00353,150.83655)"><flowRegion
+ id="flowRegion4140-6-9-7"><rect
+ id="rect4142-6-0-5"
+ width="270.72089"
+ height="68.690361"
+ x="42.426407"
+ y="481.62601"
+ style="font-size:17.5px;fill:#000000" /></flowRegion><flowPara
+ id="flowPara4146-6-2-9"
+ style="font-size:17.5px;fill:#000000">Height</flowPara></flowRoot> <flowRoot
+ xml:space="preserve"
+ id="flowRoot4138-6-3"
+ style="font-style:normal;font-weight:normal;font-size:60px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ transform="matrix(0.6007979,0,0,0.6007979,166.31611,-24.786365)"><flowRegion
+ id="flowRegion4140-6-67"><rect
+ id="rect4142-6-5"
+ width="334.36047"
+ height="80.812172"
+ x="42.426407"
+ y="481.62601"
+ style="font-size:60px;fill:#000000" /></flowRegion><flowPara
+ id="flowPara4146-6-3">Popup</flowPara></flowRoot> <flowRoot
+ xml:space="preserve"
+ id="flowRoot4138-6-2-7-5"
+ style="font-style:normal;font-weight:normal;font-size:17.5px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ transform="matrix(0.6007979,0,0,0.6007979,186.57489,257.45801)"><flowRegion
+ id="flowRegion4140-6-6-4-6"><rect
+ id="rect4142-6-1-4-2"
+ width="252.53812"
+ height="61.619293"
+ x="42.426407"
+ y="481.62601"
+ style="font-size:17.5px;fill:#000000" /></flowRegion><flowPara
+ style="font-size:17.5px;fill:#000000"
+ id="flowPara10048-9">Bottom padding</flowPara></flowRoot> <flowRoot
+ xml:space="preserve"
+ id="flowRoot4138-6-2-7-5-1"
+ style="font-style:normal;font-weight:normal;font-size:17.5px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ transform="matrix(0.6007979,0,0,0.6007979,193.9747,48.798368)"><flowRegion
+ id="flowRegion4140-6-6-4-6-2"><rect
+ id="rect4142-6-1-4-2-7"
+ width="252.53812"
+ height="61.619293"
+ x="42.426407"
+ y="481.62601"
+ style="font-size:17.5px;fill:#000000" /></flowRegion><flowPara
+ style="font-size:17.5px;fill:#000000"
+ id="flowPara10048-9-0">Top padding</flowPara></flowRoot> <flowRoot
+ xml:space="preserve"
+ id="flowRoot4138-6-2-7-5-9"
+ style="font-style:normal;font-weight:normal;font-size:17.5px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ transform="matrix(0.6007979,0,0,0.6007979,457.80767,148.11921)"><flowRegion
+ id="flowRegion4140-6-6-4-6-3"><rect
+ id="rect4142-6-1-4-2-6"
+ width="81.109558"
+ height="93.762154"
+ x="42.426407"
+ y="481.62601"
+ style="font-size:17.5px;fill:#000000" /></flowRegion><flowPara
+ style="font-size:17.5px;line-height:125%;text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:#000000"
+ id="flowPara4386">Right padding</flowPara></flowRoot> <flowRoot
+ xml:space="preserve"
+ id="flowRoot4138-6-2-7-5-9-2"
+ style="font-style:normal;font-weight:normal;font-size:17.5px;line-height:125%;font-family:sans-serif;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ transform="matrix(0.6007979,0,0,0.6007979,-54.735211,151.06168)"><flowRegion
+ id="flowRegion4140-6-6-4-6-3-5"><rect
+ id="rect4142-6-1-4-2-6-4"
+ width="81.109558"
+ height="93.762154"
+ x="42.426407"
+ y="481.62601"
+ style="font-size:17.5px;fill:#000000" /></flowRegion><flowPara
+ style="font-size:17.02554321px;line-height:125%;text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:#000000"
+ id="flowPara4386-0">Left padding</flowPara></flowRoot> </g>
+</svg>
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-scrollbar-non-attached.png b/src/imports/controls/doc/images/qtquickcontrols2-scrollbar-non-attached.png
new file mode 100644
index 00000000..8817ad5c
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-scrollbar-non-attached.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-scrollindicator-non-attached.png b/src/imports/controls/doc/images/qtquickcontrols2-scrollindicator-non-attached.png
new file mode 100644
index 00000000..758e0451
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-scrollindicator-non-attached.png
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-swipeview.gif b/src/imports/controls/doc/images/qtquickcontrols2-swipeview.gif
new file mode 100644
index 00000000..4af26c10
--- /dev/null
+++ b/src/imports/controls/doc/images/qtquickcontrols2-swipeview.gif
Binary files differ
diff --git a/src/imports/controls/doc/images/qtquickcontrols2-toolbar.png b/src/imports/controls/doc/images/qtquickcontrols2-toolbar.png
index f4808ca9..1fe353cc 100644
--- a/src/imports/controls/doc/images/qtquickcontrols2-toolbar.png
+++ b/src/imports/controls/doc/images/qtquickcontrols2-toolbar.png
Binary files differ
diff --git a/src/imports/controls/doc/qtquickcontrols2.qdocconf b/src/imports/controls/doc/qtquickcontrols2.qdocconf
index 15da00ad..42ff16f8 100644
--- a/src/imports/controls/doc/qtquickcontrols2.qdocconf
+++ b/src/imports/controls/doc/qtquickcontrols2.qdocconf
@@ -35,7 +35,6 @@ depends = qtcore qtgui qtdoc qtqml qtquick qtquickdialogs qtquickcontrols qtquic
# Note: paths passed to \example command must contain the parent directory, e.g.
# \example controls/tabs
exampledirs += ../../../../examples/quickcontrols2 \
- ../ \
../../../quicktemplates2 \
snippets \
snippets/screenshots
diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-scrollbar-non-attached.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-scrollbar-non-attached.qml
new file mode 100644
index 00000000..f80ebfe2
--- /dev/null
+++ b/src/imports/controls/doc/snippets/qtquickcontrols2-scrollbar-non-attached.qml
@@ -0,0 +1,93 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.7
+import QtQuick.Controls 2.0
+
+Item {
+ width: 200
+ height: 200
+
+//! [1]
+Rectangle {
+ id: frame
+ clip: true
+ width: 160
+ height: 160
+ border.color: "black"
+ anchors.centerIn: parent
+
+ Text {
+ id: content
+ text: "ABC"
+ font.pixelSize: 160
+ x: -hbar.position * width
+ y: -vbar.position * height
+ }
+
+ ScrollBar {
+ id: vbar
+ hoverEnabled: true
+ active: hovered || pressed
+ orientation: Qt.Vertical
+ size: frame.height / content.height
+ anchors.top: parent.top
+ anchors.right: parent.right
+ anchors.bottom: parent.bottom
+ }
+
+ ScrollBar {
+ id: hbar
+ hoverEnabled: true
+ active: hovered || pressed
+ orientation: Qt.Horizontal
+ size: frame.width / content.width
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.bottom: parent.bottom
+ }
+}
+//! [1]
+
+Component.onCompleted: {
+ hbar.active = true
+ vbar.active = true
+}
+}
diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-scrollindicator-non-attached.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-scrollindicator-non-attached.qml
new file mode 100644
index 00000000..2734f33a
--- /dev/null
+++ b/src/imports/controls/doc/snippets/qtquickcontrols2-scrollindicator-non-attached.qml
@@ -0,0 +1,97 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.7
+import QtQuick.Controls 2.0
+
+Item {
+ width: 200
+ height: 200
+
+//! [1]
+Rectangle {
+ id: frame
+ clip: true
+ width: 160
+ height: 160
+ border.color: "black"
+ anchors.centerIn: parent
+
+ Text {
+ id: content
+ text: "ABC"
+ font.pixelSize: 169
+
+ MouseArea {
+ id: mouseArea
+ drag.target: content
+ drag.minimumX: frame.width - width
+ drag.minimumY: frame.height - height
+ drag.maximumX: 0
+ drag.maximumY: 0
+ anchors.fill: content
+ }
+ }
+
+ ScrollIndicator {
+ id: verticalIndicator
+ active: mouseArea.pressed
+ orientation: Qt.Vertical
+ size: frame.height / content.height
+ position: -content.y / content.height
+ anchors { top: parent.top; right: parent.right; bottom: parent.bottom }
+ }
+
+ ScrollIndicator {
+ id: horizontalIndicator
+ active: mouseArea.pressed
+ orientation: Qt.Horizontal
+ size: frame.width / content.width
+ position: -content.x / content.width
+ anchors { left: parent.left; right: parent.right; bottom: parent.bottom }
+ }
+}
+//! [1]
+
+Component.onCompleted: {
+ horizontalIndicator.active = true;
+ verticalIndicator.active = true;
+}
+}
diff --git a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-toolbar.qml b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-toolbar.qml
index 98a13b7b..2ec10c57 100644
--- a/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-toolbar.qml
+++ b/src/imports/controls/doc/snippets/screenshots/qtquickcontrols2-toolbar.qml
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2015 The Qt Company Ltd.
+** Copyright (C) 2016 The Qt Company Ltd.
** Contact: http://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
@@ -29,19 +29,34 @@ import QtQuick 2.0
import QtQuick.Layouts 1.0
import QtQuick.Controls 2.1
+Item {
+ width: children[0].implicitWidth * 2
+ height: children[0].implicitHeight
+ Binding {
+ target: children[0]
+ property: "width"
+ value: width
+ }
//! [1]
ToolBar {
RowLayout {
anchors.fill: parent
ToolButton {
- text: qsTr("\u25C0 Qt")
+ text: qsTr("‹")
onClicked: stack.pop()
}
- Item { Layout.fillWidth: true }
- Switch {
- checked: true
- text: qsTr("Notifications")
+ Label {
+ text: "Title"
+ elide: Label.ElideRight
+ horizontalAlignment: Qt.AlignHCenter
+ verticalAlignment: Qt.AlignVCenter
+ Layout.fillWidth: true
+ }
+ ToolButton {
+ text: qsTr("⋮")
+ onClicked: menu.open()
}
}
}
//! [1]
+}
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-buttons.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-buttons.qdoc
index 610fc69e..434cf839 100644
--- a/src/imports/controls/doc/src/qtquickcontrols2-buttons.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-buttons.qdoc
@@ -127,6 +127,24 @@
\b {See also} \l RadioButton
+ \section1 RoundButton Control
+
+ \l RoundButton is a clickable control that starts an action, or opens or
+ closes a popup. A round button with a square image icon or one-letter font
+ icon is circular. A circular RoundButton takes less space than a normal
+ \l Button, and can also be used as a floating action button.
+
+ \image qtquickcontrols2-roundbutton.png
+
+ Recommendations:
+
+ \list
+ \li Keep labels short and concise.
+ \li If the text is localized, consider the influence of a longer text on the layout.
+ \endlist
+
+ \b {See also} \l RoundButton
+
\section1 Switch Control
\image qtquickcontrols2-switch.png
diff --git a/src/imports/controls/plugins.qmltypes b/src/imports/controls/plugins.qmltypes
index d1adb16c..0a89a8b0 100644
--- a/src/imports/controls/plugins.qmltypes
+++ b/src/imports/controls/plugins.qmltypes
@@ -766,9 +766,9 @@ Module {
prototype: "QQuickPopup"
exports: ["QtQuick.Templates/Dialog 2.1"]
exportMetaObjectRevisions: [0]
+ Property { name: "title"; type: "string" }
Property { name: "header"; type: "QQuickItem"; isPointer: true }
Property { name: "footer"; type: "QQuickItem"; isPointer: true }
- Property { name: "buttonBox"; type: "QQmlComponent"; isPointer: true }
Property { name: "standardButtons"; type: "QPlatformDialogHelper::StandardButtons" }
Signal { name: "accepted" }
Signal { name: "rejected" }
@@ -918,13 +918,17 @@ Module {
name: "QQuickPage"
defaultProperty: "contentData"
prototype: "QQuickControl"
- exports: ["QtQuick.Templates/Page 2.0"]
- exportMetaObjectRevisions: [0]
+ exports: ["QtQuick.Templates/Page 2.0", "QtQuick.Templates/Page 2.1"]
+ exportMetaObjectRevisions: [0, 1]
Property { name: "title"; type: "string" }
Property { name: "header"; type: "QQuickItem"; isPointer: true }
Property { name: "footer"; type: "QQuickItem"; isPointer: true }
+ Property { name: "contentWidth"; revision: 1; type: "double" }
+ Property { name: "contentHeight"; revision: 1; type: "double" }
Property { name: "contentData"; type: "QObject"; isList: true; isReadonly: true }
Property { name: "contentChildren"; type: "QQuickItem"; isList: true; isReadonly: true }
+ Signal { name: "contentWidthChanged"; revision: 1 }
+ Signal { name: "contentHeightChanged"; revision: 1 }
}
Component {
name: "QQuickPageIndicator"
@@ -952,8 +956,11 @@ Module {
name: "QQuickPopup"
defaultProperty: "contentData"
prototype: "QObject"
- exports: ["QtQuick.Templates/Popup 2.0"]
- exportMetaObjectRevisions: [0]
+ exports: [
+ "QtQuick.Templates/Popup 2.0",
+ "QtQuick.Templates/Popup 2.1"
+ ]
+ exportMetaObjectRevisions: [0, 1]
Enum {
name: "ClosePolicy"
values: {
@@ -990,6 +997,7 @@ Module {
Property { name: "contentHeight"; type: "double" }
Property { name: "availableWidth"; type: "double"; isReadonly: true }
Property { name: "availableHeight"; type: "double"; isReadonly: true }
+ Property { name: "spacing"; revision: 1; type: "double" }
Property { name: "margins"; type: "double" }
Property { name: "topMargin"; type: "double" }
Property { name: "leftMargin"; type: "double" }
@@ -1019,6 +1027,7 @@ Module {
Property { name: "transformOrigin"; type: "TransformOrigin" }
Property { name: "enter"; type: "QQuickTransition"; isPointer: true }
Property { name: "exit"; type: "QQuickTransition"; isPointer: true }
+ Signal { name: "spacingChanged"; revision: 1 }
Signal {
name: "windowChanged"
Parameter { name: "window"; type: "QQuickWindow"; isPointer: true }
diff --git a/src/imports/templates/plugins.qmltypes b/src/imports/templates/plugins.qmltypes
index 002ea9b7..31267ce2 100644
--- a/src/imports/templates/plugins.qmltypes
+++ b/src/imports/templates/plugins.qmltypes
@@ -276,9 +276,9 @@ Module {
prototype: "QQuickPopup"
exports: ["QtQuick.Templates/Dialog 2.1"]
exportMetaObjectRevisions: [0]
+ Property { name: "title"; type: "string" }
Property { name: "header"; type: "QQuickItem"; isPointer: true }
Property { name: "footer"; type: "QQuickItem"; isPointer: true }
- Property { name: "buttonBox"; type: "QQmlComponent"; isPointer: true }
Property { name: "standardButtons"; type: "QPlatformDialogHelper::StandardButtons" }
Signal { name: "accepted" }
Signal { name: "rejected" }
@@ -428,13 +428,17 @@ Module {
name: "QQuickPage"
defaultProperty: "contentData"
prototype: "QQuickControl"
- exports: ["QtQuick.Templates/Page 2.0"]
- exportMetaObjectRevisions: [0]
+ exports: ["QtQuick.Templates/Page 2.0", "QtQuick.Templates/Page 2.1"]
+ exportMetaObjectRevisions: [0, 1]
Property { name: "title"; type: "string" }
Property { name: "header"; type: "QQuickItem"; isPointer: true }
Property { name: "footer"; type: "QQuickItem"; isPointer: true }
+ Property { name: "contentWidth"; revision: 1; type: "double" }
+ Property { name: "contentHeight"; revision: 1; type: "double" }
Property { name: "contentData"; type: "QObject"; isList: true; isReadonly: true }
Property { name: "contentChildren"; type: "QQuickItem"; isList: true; isReadonly: true }
+ Signal { name: "contentWidthChanged"; revision: 1 }
+ Signal { name: "contentHeightChanged"; revision: 1 }
}
Component {
name: "QQuickPageIndicator"
@@ -462,8 +466,11 @@ Module {
name: "QQuickPopup"
defaultProperty: "contentData"
prototype: "QObject"
- exports: ["QtQuick.Templates/Popup 2.0"]
- exportMetaObjectRevisions: [0]
+ exports: [
+ "QtQuick.Templates/Popup 2.0",
+ "QtQuick.Templates/Popup 2.1"
+ ]
+ exportMetaObjectRevisions: [0, 1]
Enum {
name: "ClosePolicy"
values: {
@@ -500,6 +507,7 @@ Module {
Property { name: "contentHeight"; type: "double" }
Property { name: "availableWidth"; type: "double"; isReadonly: true }
Property { name: "availableHeight"; type: "double"; isReadonly: true }
+ Property { name: "spacing"; revision: 1; type: "double" }
Property { name: "margins"; type: "double" }
Property { name: "topMargin"; type: "double" }
Property { name: "leftMargin"; type: "double" }
@@ -529,6 +537,7 @@ Module {
Property { name: "transformOrigin"; type: "TransformOrigin" }
Property { name: "enter"; type: "QQuickTransition"; isPointer: true }
Property { name: "exit"; type: "QQuickTransition"; isPointer: true }
+ Signal { name: "spacingChanged"; revision: 1 }
Signal {
name: "windowChanged"
Parameter { name: "window"; type: "QQuickWindow"; isPointer: true }
diff --git a/src/imports/templates/qtquicktemplates2plugin.cpp b/src/imports/templates/qtquicktemplates2plugin.cpp
index 58e5ce90..b6385cb9 100644
--- a/src/imports/templates/qtquicktemplates2plugin.cpp
+++ b/src/imports/templates/qtquicktemplates2plugin.cpp
@@ -69,6 +69,7 @@
#include <QtQuickTemplates2/private/qquickroundbutton_p.h>
#include <QtQuickTemplates2/private/qquickscrollbar_p.h>
#include <QtQuickTemplates2/private/qquickscrollindicator_p.h>
+#include <QtQuickTemplates2/private/qquickshortcutcontext_p_p.h>
#include <QtQuickTemplates2/private/qquickslider_p.h>
#include <QtQuickTemplates2/private/qquickspinbox_p.h>
#include <QtQuickTemplates2/private/qquickstackview_p.h>
@@ -93,6 +94,11 @@ static inline void initResources()
#endif
}
+// qtdeclarative/src/quick/util/qquickshortcut.cpp
+typedef bool (*ShortcutContextMatcher)(QObject *, Qt::ShortcutContext);
+extern ShortcutContextMatcher qt_quick_shortcut_context_matcher();
+extern void qt_quick_set_shortcut_context_matcher(ShortcutContextMatcher matcher);
+
QT_BEGIN_NAMESPACE
class QtQuickTemplates2Plugin: public QQmlExtensionPlugin
@@ -102,12 +108,25 @@ class QtQuickTemplates2Plugin: public QQmlExtensionPlugin
public:
QtQuickTemplates2Plugin(QObject *parent = nullptr);
+ ~QtQuickTemplates2Plugin();
+
void registerTypes(const char *uri);
+
+private:
+ ShortcutContextMatcher originalContextMatcher;
};
QtQuickTemplates2Plugin::QtQuickTemplates2Plugin(QObject *parent) : QQmlExtensionPlugin(parent)
{
initResources();
+
+ originalContextMatcher = qt_quick_shortcut_context_matcher();
+ qt_quick_set_shortcut_context_matcher(QQuickShortcutContext::matcher);
+}
+
+QtQuickTemplates2Plugin::~QtQuickTemplates2Plugin()
+{
+ qt_quick_set_shortcut_context_matcher(originalContextMatcher);
}
void QtQuickTemplates2Plugin::registerTypes(const char *uri)