aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports
diff options
context:
space:
mode:
Diffstat (limited to 'src/imports')
-rw-r--r--src/imports/controls/ComboBox.qml11
-rw-r--r--src/imports/controls/HorizontalHeaderView.qml59
-rw-r--r--src/imports/controls/VerticalHeaderView.qml59
-rw-r--r--src/imports/controls/controls.pri4
-rw-r--r--src/imports/controls/doc/snippets/qtquickcontrols2-combobox-custom.qml2
-rw-r--r--src/imports/controls/doc/snippets/qtquickcontrols2-delaybutton-custom.qml2
-rw-r--r--src/imports/controls/doc/snippets/qtquickcontrols2-headerview-simple.qml123
-rw-r--r--src/imports/controls/doc/src/includes/customize-button-background.qdocinc25
-rw-r--r--src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc120
-rw-r--r--src/imports/controls/fusion/ComboBox.qml15
-rw-r--r--src/imports/controls/fusion/HorizontalHeaderView.qml69
-rw-r--r--src/imports/controls/fusion/VerticalHeaderView.qml69
-rw-r--r--src/imports/controls/fusion/fusion.pri4
-rw-r--r--src/imports/controls/imagine/ComboBox.qml13
-rw-r--r--src/imports/controls/imagine/HorizontalHeaderView.qml59
-rw-r--r--src/imports/controls/imagine/VerticalHeaderView.qml59
-rw-r--r--src/imports/controls/imagine/imagine.pri4
-rw-r--r--src/imports/controls/material/ComboBox.qml15
-rw-r--r--src/imports/controls/material/CursorDelegate.qml2
-rw-r--r--src/imports/controls/material/HorizontalHeaderView.qml60
-rw-r--r--src/imports/controls/material/VerticalHeaderView.qml60
-rw-r--r--src/imports/controls/material/material.pri4
-rw-r--r--src/imports/controls/material/shaders/+qsb/RectangularGlow.fragbin2321 -> 2007 bytes
-rw-r--r--src/imports/controls/material/shaders/compile.bat40
-rw-r--r--src/imports/controls/qtquickcontrols2plugin.cpp4
-rw-r--r--src/imports/controls/universal/ComboBox.qml13
-rw-r--r--src/imports/controls/universal/HorizontalHeaderView.qml61
-rw-r--r--src/imports/controls/universal/VerticalHeaderView.qml61
-rw-r--r--src/imports/controls/universal/universal.pri4
-rw-r--r--src/imports/platform/qquickplatformdialog.cpp2
-rw-r--r--src/imports/platform/qquickplatformfiledialog.cpp2
-rw-r--r--src/imports/platform/qquickplatformfolderdialog.cpp2
-rw-r--r--src/imports/templates/qtquicktemplates2plugin.cpp8
33 files changed, 970 insertions, 65 deletions
diff --git a/src/imports/controls/ComboBox.qml b/src/imports/controls/ComboBox.qml
index 8eefc686..b30293f5 100644
--- a/src/imports/controls/ComboBox.qml
+++ b/src/imports/controls/ComboBox.qml
@@ -34,11 +34,11 @@
**
****************************************************************************/
-import QtQuick 2.14
-import QtQuick.Window 2.14
-import QtQuick.Controls 2.14
-import QtQuick.Controls.impl 2.14
-import QtQuick.Templates 2.14 as T
+import QtQuick 2.15
+import QtQuick.Window 2.15
+import QtQuick.Controls 2.15
+import QtQuick.Controls.impl 2.15
+import QtQuick.Templates 2.15 as T
T.ComboBox {
id: control
@@ -84,6 +84,7 @@ T.ComboBox {
readOnly: control.down
inputMethodHints: control.inputMethodHints
validator: control.validator
+ selectByMouse: control.selectTextByMouse
font: control.font
color: control.editable ? control.palette.text : control.palette.buttonText
diff --git a/src/imports/controls/HorizontalHeaderView.qml b/src/imports/controls/HorizontalHeaderView.qml
new file mode 100644
index 00000000..946d3a75
--- /dev/null
+++ b/src/imports/controls/HorizontalHeaderView.qml
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.15
+import QtQuick.Controls 2.15
+import QtQuick.Templates 2.15 as T
+
+T.HorizontalHeaderView {
+ id: control
+
+ delegate: Rectangle {
+ implicitWidth: 50
+ implicitHeight: 25
+ color: "#f6f6f6"
+ border.color: "#e4e4e4"
+
+ Text {
+ text: model[control.textRole]
+ width: parent.width
+ height: parent.height
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ color: "#ff26282a"
+ }
+ }
+}
diff --git a/src/imports/controls/VerticalHeaderView.qml b/src/imports/controls/VerticalHeaderView.qml
new file mode 100644
index 00000000..67d4c1ce
--- /dev/null
+++ b/src/imports/controls/VerticalHeaderView.qml
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.15
+import QtQuick.Controls 2.15
+import QtQuick.Templates 2.15 as T
+
+T.VerticalHeaderView {
+ id: control
+
+ delegate: Rectangle {
+ implicitWidth: 50
+ implicitHeight: 25
+ color: "#f6f6f6"
+ border.color: "#e4e4e4"
+
+ Text {
+ text: model[control.textRole]
+ width: parent.width
+ height: parent.height
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ color: "#ff26282a"
+ }
+ }
+}
diff --git a/src/imports/controls/controls.pri b/src/imports/controls/controls.pri
index fbf5d075..03fc0f4b 100644
--- a/src/imports/controls/controls.pri
+++ b/src/imports/controls/controls.pri
@@ -32,6 +32,7 @@ QML_FILES += \
$$PWD/Drawer.qml \
$$PWD/Frame.qml \
$$PWD/GroupBox.qml \
+ $$PWD/HorizontalHeaderView.qml \
$$PWD/ItemDelegate.qml \
$$PWD/Label.qml \
$$PWD/Menu.qml \
@@ -67,4 +68,5 @@ QML_FILES += \
$$PWD/ToolButton.qml \
$$PWD/ToolSeparator.qml \
$$PWD/ToolTip.qml \
- $$PWD/Tumbler.qml
+ $$PWD/Tumbler.qml \
+ $$PWD/VerticalHeaderView.qml
diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-combobox-custom.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-combobox-custom.qml
index 1bb68bdf..b902dab1 100644
--- a/src/imports/controls/doc/snippets/qtquickcontrols2-combobox-custom.qml
+++ b/src/imports/controls/doc/snippets/qtquickcontrols2-combobox-custom.qml
@@ -55,7 +55,7 @@ ComboBox {
Connections {
target: control
- onPressedChanged: canvas.requestPaint()
+ function onPressedChanged() { canvas.requestPaint(); }
}
onPaint: {
diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-delaybutton-custom.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-delaybutton-custom.qml
index 86c6a0b7..4bcbaa67 100644
--- a/src/imports/controls/doc/snippets/qtquickcontrols2-delaybutton-custom.qml
+++ b/src/imports/controls/doc/snippets/qtquickcontrols2-delaybutton-custom.qml
@@ -62,7 +62,7 @@ DelayButton {
Connections {
target: control
- onProgressChanged: canvas.requestPaint()
+ function onProgressChanged() { canvas.requestPaint(); }
}
onPaint: {
diff --git a/src/imports/controls/doc/snippets/qtquickcontrols2-headerview-simple.qml b/src/imports/controls/doc/snippets/qtquickcontrols2-headerview-simple.qml
new file mode 100644
index 00000000..bea46bf3
--- /dev/null
+++ b/src/imports/controls/doc/snippets/qtquickcontrols2-headerview-simple.qml
@@ -0,0 +1,123 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, 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$
+**
+****************************************************************************/
+
+//![file]
+import QtQuick 2.15
+import QtQuick.Controls 2.15
+import Qt.labs.qmlmodels 1.0
+
+ApplicationWindow {
+ visible: true
+ width: 640
+ height: 480
+
+ //! [horizontal]
+ HorizontalHeaderView {
+ id: horizontalHeader
+ syncView: tableView
+ anchors.left: tableView.left
+ width: parent.width
+ height: contentHeight
+ }
+ //! [horizontal]
+
+ //! [vertical]
+ VerticalHeaderView {
+ id: verticalHeader
+ syncView: tableView
+ anchors.top: tableView.top
+ width: contentWidth
+ height: parent.height
+ }
+ //! [vertical]
+
+ TableView {
+ id: tableView
+ anchors.fill: parent
+ anchors.topMargin: horizontalHeader.height
+ anchors.leftMargin: verticalHeader.width
+ columnSpacing: 1
+ rowSpacing: 1
+ clip: true
+
+ model: TableModel {
+ TableModelColumn { display: "name" }
+ TableModelColumn { display: "color" }
+
+ rows: [
+ {
+ "name": "cat",
+ "color": "black"
+ },
+ {
+ "name": "dog",
+ "color": "brown"
+ },
+ {
+ "name": "bird",
+ "color": "white"
+ }
+ ]
+ }
+
+ delegate: Rectangle {
+ implicitWidth: 100
+ implicitHeight: 50
+ border.width: 1
+
+ Text {
+ text: display
+ anchors.centerIn: parent
+ }
+ }
+ }
+}
+
+//![file]
diff --git a/src/imports/controls/doc/src/includes/customize-button-background.qdocinc b/src/imports/controls/doc/src/includes/customize-button-background.qdocinc
new file mode 100644
index 00000000..59df7d8e
--- /dev/null
+++ b/src/imports/controls/doc/src/includes/customize-button-background.qdocinc
@@ -0,0 +1,25 @@
+//! [file]
+\qml \QtMinorVersion
+import QtQuick 2.\1
+import QtQuick.Controls 2.\1
+
+ApplicationWindow {
+ width: 400
+ height: 400
+ visible: true
+
+ Button {
+ id: button
+ text: "A Special Button"
+ background: Rectangle {
+ implicitWidth: 100
+ implicitHeight: 40
+ color: button.down ? "#d6d6d6" : "#f6f6f6"
+ border.color: "#26282a"
+ border.width: 1
+ radius: 4
+ }
+ }
+}
+\endqml
+//! [file]
diff --git a/src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc b/src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc
index ca1ecf48..5901663a 100644
--- a/src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc
+++ b/src/imports/controls/doc/src/qtquickcontrols2-customize.qdoc
@@ -48,29 +48,7 @@
can override the \l {Control::}{background} item and set the radius
property of Rectangle:
- \qml \QtMinorVersion
- import QtQuick 2.\1
- import QtQuick.Controls 2.\1
-
- ApplicationWindow {
- width: 400
- height: 400
- visible: true
-
- Button {
- id: button
- text: "A Special Button"
- background: Rectangle {
- implicitWidth: 100
- implicitHeight: 40
- color: button.down ? "#d6d6d6" : "#f6f6f6"
- border.color: "#26282a"
- border.width: 1
- radius: 4
- }
- }
- }
- \endqml
+ \include customize-button-background.qdocinc file
The second way to create the button is good if you plan to use your rounded
button in several places. It involves moving the code into its own QML file
@@ -214,6 +192,102 @@
files.
\endlist
+ \section3 Considerations for custom styles
+
+ When implementing your own style and customizing controls, there are some
+ points to keep in mind to ensure that your application is as performant as
+ possible.
+
+ \section4 Avoid assigning an id to styles' implementations of item delegates
+
+ As explained in \l {Definition of a Style}, when you implement your
+ own style for a control, you start off with the relevant template for
+ that control. For example, a style's \c Button.qml will be structured
+ similarly to this:
+
+ \qml
+ T.Button {
+ // ...
+
+ background: Rectangle {
+ // ...
+ }
+
+ contentItem: Text {
+ // ...
+ }
+
+ // ...
+ }
+ \endqml
+
+ When you use a Button in your application, the \c background and
+ \c contentItem items will be created and parented to the root \c Button
+ item:
+
+ \qml
+ // Creates the Button root item, the Rectangle background,
+ // and the Text contentItem.
+ Button {
+ text: qsTr("Confirm")
+ }
+ \endqml
+
+ Suppose you then needed to do a one-off customization of the Button (as
+ explained in \l {Customizing a Control}):
+
+ \include customize-button-background.qdocinc file
+
+ In QML, this would normally result in both the default \c background
+ implementation and the one-off, custom \c background items being created.
+ Qt Quick Controls uses a technique that avoids creating both items, and
+ instead only creates the custom \c background, greatly improving the
+ creation performance of controls.
+
+ This technique relies on the absence of an \l {The id Attribute}{id} in the
+ style's implementation of that item. If an id is assigned, the technique
+ cannot work, and both items will be created. For example, it can be
+ tempting to assign an id to the \c background or \c contentItem so that
+ other objects within the file can refer to those items:
+
+ \qml
+ T.Button {
+ // ...
+
+ background: Rectangle {
+ id: backgroundRect
+ // ...
+ }
+
+ contentItem: Text {
+ // Use backgroundRect in some way...
+ }
+
+ // ...
+ }
+ \endqml
+
+ With this code, every time a Button instance with a customized background
+ is created, both backgrounds will be created, resulting in sub-optimal
+ creation performance.
+
+ Prior to Qt 5.15, the old, unused background would be deleted to release
+ the resources associated with it. However, as the control does not own the
+ items, it should not delete them. As of Qt 5.15, old items are no longer
+ deleted, and so the \c backgroundRect item will live longer than it needs
+ to—typically until the application exits. Although the old item will be
+ hidden, visually unparented from the control, and removed from the
+ accessibility tree, it is important to keep the creation time and memory
+ usage of these unused items in mind when assigning an id in this context.
+
+ \section4 Avoid imperative assignments of custom items
+
+ The technique mentioned in the section above only works when an item is
+ \l {Prefer Declarative Bindings Over Imperative Assignments}{declaratively}
+ assigned for the first time, and so imperative assignments will result in
+ orphaned items. Always use declarative bindings to assign custom items
+ when possible.
+
\section3 Attached properties
It is common for a style to have certain properties or attributes that
diff --git a/src/imports/controls/fusion/ComboBox.qml b/src/imports/controls/fusion/ComboBox.qml
index e9b836ef..d8ef1888 100644
--- a/src/imports/controls/fusion/ComboBox.qml
+++ b/src/imports/controls/fusion/ComboBox.qml
@@ -34,13 +34,13 @@
**
****************************************************************************/
-import QtQuick 2.14
-import QtQuick.Window 2.14
-import QtQuick.Templates 2.14 as T
-import QtQuick.Controls 2.14
-import QtQuick.Controls.impl 2.14
-import QtQuick.Controls.Fusion 2.14
-import QtQuick.Controls.Fusion.impl 2.14
+import QtQuick 2.15
+import QtQuick.Window 2.15
+import QtQuick.Templates 2.15 as T
+import QtQuick.Controls 2.15
+import QtQuick.Controls.impl 2.15
+import QtQuick.Controls.Fusion 2.15
+import QtQuick.Controls.Fusion.impl 2.15
T.ComboBox {
id: control
@@ -84,6 +84,7 @@ T.ComboBox {
readOnly: control.down
inputMethodHints: control.inputMethodHints
validator: control.validator
+ selectByMouse: control.selectTextByMouse
font: control.font
color: control.editable ? control.palette.text : control.palette.buttonText
diff --git a/src/imports/controls/fusion/HorizontalHeaderView.qml b/src/imports/controls/fusion/HorizontalHeaderView.qml
new file mode 100644
index 00000000..0be27642
--- /dev/null
+++ b/src/imports/controls/fusion/HorizontalHeaderView.qml
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.15
+import QtQuick.Controls 2.15
+import QtQuick.Templates 2.15 as T
+
+T.HorizontalHeaderView {
+ id: control
+
+ delegate: Rectangle {
+ implicitWidth: 50
+ implicitHeight: 25
+ border.color: "#cacaca"
+
+ gradient: Gradient {
+ GradientStop {
+ position: 0
+ color: "#fbfbfb"
+ }
+ GradientStop {
+ position: 1
+ color: "#e0dfe0"
+ }
+ }
+
+ Text {
+ text: model[control.textRole]
+ width: parent.width
+ height: parent.height
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ color: "#ff26282a"
+ }
+ }
+}
diff --git a/src/imports/controls/fusion/VerticalHeaderView.qml b/src/imports/controls/fusion/VerticalHeaderView.qml
new file mode 100644
index 00000000..a9eadc23
--- /dev/null
+++ b/src/imports/controls/fusion/VerticalHeaderView.qml
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.15
+import QtQuick.Controls 2.15
+import QtQuick.Templates 2.15 as T
+
+T.VerticalHeaderView {
+ id: control
+
+ delegate: Rectangle {
+ implicitWidth: 50
+ implicitHeight: 25
+ border.color: "#cacaca"
+
+ gradient: Gradient {
+ GradientStop {
+ position: 0
+ color: "#fbfbfb"
+ }
+ GradientStop {
+ position: 1
+ color: "#e0dfe0"
+ }
+ }
+
+ Text {
+ text: model[control.textRole]
+ width: parent.width
+ height: parent.height
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ color: "#ff26282a"
+ }
+ }
+}
diff --git a/src/imports/controls/fusion/fusion.pri b/src/imports/controls/fusion/fusion.pri
index 72978db5..bdc413fd 100644
--- a/src/imports/controls/fusion/fusion.pri
+++ b/src/imports/controls/fusion/fusion.pri
@@ -28,6 +28,7 @@ QML_FILES += \
$$PWD/Drawer.qml \
$$PWD/Frame.qml \
$$PWD/GroupBox.qml \
+ $$PWD/HorizontalHeaderView.qml \
$$PWD/ItemDelegate.qml \
$$PWD/Label.qml \
$$PWD/Menu.qml \
@@ -64,4 +65,5 @@ QML_FILES += \
$$PWD/ToolButton.qml \
$$PWD/ToolSeparator.qml \
$$PWD/ToolTip.qml \
- $$PWD/Tumbler.qml
+ $$PWD/Tumbler.qml \
+ $$PWD/VerticalHeaderView.qml
diff --git a/src/imports/controls/imagine/ComboBox.qml b/src/imports/controls/imagine/ComboBox.qml
index 2d582e98..92937826 100644
--- a/src/imports/controls/imagine/ComboBox.qml
+++ b/src/imports/controls/imagine/ComboBox.qml
@@ -34,12 +34,12 @@
**
****************************************************************************/
-import QtQuick 2.14
-import QtQuick.Window 2.14
-import QtQuick.Templates 2.14 as T
-import QtQuick.Controls 2.14
-import QtQuick.Controls.Imagine 2.14
-import QtQuick.Controls.Imagine.impl 2.14
+import QtQuick 2.15
+import QtQuick.Window 2.15
+import QtQuick.Templates 2.15 as T
+import QtQuick.Controls 2.15
+import QtQuick.Controls.Imagine 2.15
+import QtQuick.Controls.Imagine.impl 2.15
T.ComboBox {
id: control
@@ -98,6 +98,7 @@ T.ComboBox {
readOnly: control.down
inputMethodHints: control.inputMethodHints
validator: control.validator
+ selectByMouse: control.selectTextByMouse
font: control.font
color: control.flat ? control.palette.windowText : control.editable ? control.palette.text : control.palette.buttonText
diff --git a/src/imports/controls/imagine/HorizontalHeaderView.qml b/src/imports/controls/imagine/HorizontalHeaderView.qml
new file mode 100644
index 00000000..946d3a75
--- /dev/null
+++ b/src/imports/controls/imagine/HorizontalHeaderView.qml
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.15
+import QtQuick.Controls 2.15
+import QtQuick.Templates 2.15 as T
+
+T.HorizontalHeaderView {
+ id: control
+
+ delegate: Rectangle {
+ implicitWidth: 50
+ implicitHeight: 25
+ color: "#f6f6f6"
+ border.color: "#e4e4e4"
+
+ Text {
+ text: model[control.textRole]
+ width: parent.width
+ height: parent.height
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ color: "#ff26282a"
+ }
+ }
+}
diff --git a/src/imports/controls/imagine/VerticalHeaderView.qml b/src/imports/controls/imagine/VerticalHeaderView.qml
new file mode 100644
index 00000000..67d4c1ce
--- /dev/null
+++ b/src/imports/controls/imagine/VerticalHeaderView.qml
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.15
+import QtQuick.Controls 2.15
+import QtQuick.Templates 2.15 as T
+
+T.VerticalHeaderView {
+ id: control
+
+ delegate: Rectangle {
+ implicitWidth: 50
+ implicitHeight: 25
+ color: "#f6f6f6"
+ border.color: "#e4e4e4"
+
+ Text {
+ text: model[control.textRole]
+ width: parent.width
+ height: parent.height
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ color: "#ff26282a"
+ }
+ }
+}
diff --git a/src/imports/controls/imagine/imagine.pri b/src/imports/controls/imagine/imagine.pri
index 081a509e..4c6bcf1b 100644
--- a/src/imports/controls/imagine/imagine.pri
+++ b/src/imports/controls/imagine/imagine.pri
@@ -12,6 +12,7 @@ QML_FILES += \
$$PWD/Drawer.qml \
$$PWD/Frame.qml \
$$PWD/GroupBox.qml \
+ $$PWD/HorizontalHeaderView.qml \
$$PWD/ItemDelegate.qml \
$$PWD/Label.qml \
$$PWD/Menu.qml \
@@ -44,7 +45,8 @@ QML_FILES += \
$$PWD/ToolButton.qml \
$$PWD/ToolSeparator.qml \
$$PWD/ToolTip.qml \
- $$PWD/Tumbler.qml
+ $$PWD/Tumbler.qml \
+ $$PWD/VerticalHeaderView.qml
HEADERS += \
$$PWD/qquickimageselector_p.h \
diff --git a/src/imports/controls/material/ComboBox.qml b/src/imports/controls/material/ComboBox.qml
index 7d635902..e4ee332b 100644
--- a/src/imports/controls/material/ComboBox.qml
+++ b/src/imports/controls/material/ComboBox.qml
@@ -34,13 +34,13 @@
**
****************************************************************************/
-import QtQuick 2.14
-import QtQuick.Window 2.14
-import QtQuick.Controls 2.14
-import QtQuick.Controls.impl 2.14
-import QtQuick.Templates 2.14 as T
-import QtQuick.Controls.Material 2.14
-import QtQuick.Controls.Material.impl 2.14
+import QtQuick 2.15
+import QtQuick.Window 2.15
+import QtQuick.Controls 2.15
+import QtQuick.Controls.impl 2.15
+import QtQuick.Templates 2.15 as T
+import QtQuick.Controls.Material 2.15
+import QtQuick.Controls.Material.impl 2.15
T.ComboBox {
id: control
@@ -89,6 +89,7 @@ T.ComboBox {
readOnly: control.down
inputMethodHints: control.inputMethodHints
validator: control.validator
+ selectByMouse: control.selectTextByMouse
font: control.font
color: control.enabled ? control.Material.foreground : control.Material.hintTextColor
diff --git a/src/imports/controls/material/CursorDelegate.qml b/src/imports/controls/material/CursorDelegate.qml
index 1626a6fb..fe2d25c6 100644
--- a/src/imports/controls/material/CursorDelegate.qml
+++ b/src/imports/controls/material/CursorDelegate.qml
@@ -46,7 +46,7 @@ Rectangle {
Connections {
target: cursor.parent
- onCursorPositionChanged: {
+ function onCursorPositionChanged() {
// keep a moving cursor visible
cursor.opacity = 1
timer.restart()
diff --git a/src/imports/controls/material/HorizontalHeaderView.qml b/src/imports/controls/material/HorizontalHeaderView.qml
new file mode 100644
index 00000000..a1228cdc
--- /dev/null
+++ b/src/imports/controls/material/HorizontalHeaderView.qml
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.15
+import QtQuick.Controls 2.15
+import QtQuick.Templates 2.15 as T
+import QtQuick.Controls.Material 2.15
+import QtQuick.Controls.Material.impl 2.15
+
+T.HorizontalHeaderView {
+ id: control
+
+ delegate: Rectangle {
+ implicitWidth: 50
+ implicitHeight: 25
+ color: control.Material.backgroundColor
+
+ Text {
+ text: model[control.textRole]
+ width: parent.width
+ height: parent.height
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ color: enabled ? control.Material.foreground : control.Material.hintTextColor
+ }
+ }
+}
diff --git a/src/imports/controls/material/VerticalHeaderView.qml b/src/imports/controls/material/VerticalHeaderView.qml
new file mode 100644
index 00000000..8acda3d7
--- /dev/null
+++ b/src/imports/controls/material/VerticalHeaderView.qml
@@ -0,0 +1,60 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.15
+import QtQuick.Controls 2.15
+import QtQuick.Templates 2.15 as T
+import QtQuick.Controls.Material 2.15
+import QtQuick.Controls.Material.impl 2.15
+
+T.VerticalHeaderView {
+ id: control
+
+ delegate: Rectangle {
+ implicitWidth: 50
+ implicitHeight: 25
+ color: control.Material.backgroundColor
+
+ Text {
+ text: model[control.textRole]
+ width: parent.width
+ height: parent.height
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ color: enabled ? control.Material.foreground : control.Material.hintTextColor
+ }
+ }
+}
diff --git a/src/imports/controls/material/material.pri b/src/imports/controls/material/material.pri
index bda1fb21..457a8df1 100644
--- a/src/imports/controls/material/material.pri
+++ b/src/imports/controls/material/material.pri
@@ -30,6 +30,7 @@ QML_FILES += \
$$PWD/ElevationEffect.qml \
$$PWD/Frame.qml \
$$PWD/GroupBox.qml \
+ $$PWD/HorizontalHeaderView.qml \
$$PWD/ItemDelegate.qml \
$$PWD/Label.qml \
$$PWD/Menu.qml \
@@ -68,4 +69,5 @@ QML_FILES += \
$$PWD/ToolButton.qml \
$$PWD/ToolSeparator.qml \
$$PWD/ToolTip.qml \
- $$PWD/Tumbler.qml
+ $$PWD/Tumbler.qml \
+ $$PWD/VerticalHeaderView.qml
diff --git a/src/imports/controls/material/shaders/+qsb/RectangularGlow.frag b/src/imports/controls/material/shaders/+qsb/RectangularGlow.frag
index a805b134..5cfa2db6 100644
--- a/src/imports/controls/material/shaders/+qsb/RectangularGlow.frag
+++ b/src/imports/controls/material/shaders/+qsb/RectangularGlow.frag
Binary files differ
diff --git a/src/imports/controls/material/shaders/compile.bat b/src/imports/controls/material/shaders/compile.bat
new file mode 100644
index 00000000..e87efa7a
--- /dev/null
+++ b/src/imports/controls/material/shaders/compile.bat
@@ -0,0 +1,40 @@
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+::
+:: Copyright (C) 2019 The Qt Company Ltd.
+:: Contact: https://www.qt.io/licensing/
+::
+:: This file is part of the QtQuick module of the Qt Toolkit.
+::
+:: $QT_BEGIN_LICENSE:LGPL$
+:: Commercial License Usage
+:: Licensees holding valid commercial Qt licenses may use this file in
+:: accordance with the commercial license agreement provided with the
+:: Software or, alternatively, in accordance with the terms contained in
+:: a written agreement between you and The Qt Company. For licensing terms
+:: and conditions see https://www.qt.io/terms-conditions. For further
+:: information use the contact form at https://www.qt.io/contact-us.
+::
+:: GNU Lesser General Public License Usage
+:: Alternatively, this file may be used under the terms of the GNU Lesser
+:: General Public License version 3 as published by the Free Software
+:: Foundation and appearing in the file LICENSE.LGPL3 included in the
+:: packaging of this file. Please review the following information to
+:: ensure the GNU Lesser General Public License version 3 requirements
+:: will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
+::
+:: GNU General Public License Usage
+:: Alternatively, this file may be used under the terms of the GNU
+:: General Public License version 2.0 or (at your option) the GNU General
+:: Public license version 3 or any later version approved by the KDE Free
+:: Qt Foundation. The licenses are as published by the Free Software
+:: Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+:: included in the packaging of this file. Please review the following
+:: information to ensure the GNU General Public License requirements will
+:: be met: https://www.gnu.org/licenses/gpl-2.0.html and
+:: https://www.gnu.org/licenses/gpl-3.0.html.
+::
+:: $QT_END_LICENSE$
+::
+:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+
+qsb --glsl "150,120,100 es" --hlsl 50 --msl 12 -o +qsb/RectangularGlow.frag RectangularGlow_rhi.frag
diff --git a/src/imports/controls/qtquickcontrols2plugin.cpp b/src/imports/controls/qtquickcontrols2plugin.cpp
index 260e7297..9fe82ba2 100644
--- a/src/imports/controls/qtquickcontrols2plugin.cpp
+++ b/src/imports/controls/qtquickcontrols2plugin.cpp
@@ -198,6 +198,10 @@ void QtQuickControls2Plugin::registerTypes(const char *uri)
qmlRegisterUncreatableType<QQuickSplitHandleAttached>(uri, 2, 13, "SplitHandle",
QStringLiteral("SplitHandle is only available as an attached property."));
+ // QtQuick.Controls 2.15 (new types in Qt 5.15)
+ qmlRegisterType(resolvedUrl(QStringLiteral("HorizontalHeaderView.qml")), uri, 2, 15, "HorizontalHeaderView");
+ qmlRegisterType(resolvedUrl(QStringLiteral("VerticalHeaderView.qml")), uri, 2, 15, "VerticalHeaderView");
+
// Register the latest version, even if there are no new types or new revisions for existing types yet.
// Before Qt 5.12, we would do the following:
//
diff --git a/src/imports/controls/universal/ComboBox.qml b/src/imports/controls/universal/ComboBox.qml
index 9a4e119b..fd2d8935 100644
--- a/src/imports/controls/universal/ComboBox.qml
+++ b/src/imports/controls/universal/ComboBox.qml
@@ -34,12 +34,12 @@
**
****************************************************************************/
-import QtQuick 2.14
-import QtQuick.Window 2.14
-import QtQuick.Controls 2.14
-import QtQuick.Controls.impl 2.14
-import QtQuick.Templates 2.14 as T
-import QtQuick.Controls.Universal 2.14
+import QtQuick 2.15
+import QtQuick.Window 2.15
+import QtQuick.Controls 2.15
+import QtQuick.Controls.impl 2.15
+import QtQuick.Templates 2.15 as T
+import QtQuick.Controls.Universal 2.15
T.ComboBox {
id: control
@@ -94,6 +94,7 @@ T.ComboBox {
readOnly: control.down
inputMethodHints: control.inputMethodHints
validator: control.validator
+ selectByMouse: control.selectTextByMouse
font: control.font
color: !control.enabled ? control.Universal.chromeDisabledLowColor :
diff --git a/src/imports/controls/universal/HorizontalHeaderView.qml b/src/imports/controls/universal/HorizontalHeaderView.qml
new file mode 100644
index 00000000..6f48560e
--- /dev/null
+++ b/src/imports/controls/universal/HorizontalHeaderView.qml
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.15
+import QtQuick.Controls 2.15
+import QtQuick.Controls.impl 2.15
+import QtQuick.Templates 2.15 as T
+import QtQuick.Controls.Universal 2.15
+import QtQuick.Controls.Universal.impl 2.15
+
+T.HorizontalHeaderView {
+ id: control
+
+ delegate: Rectangle {
+ implicitWidth: 50
+ implicitHeight: 25
+ color: control.Universal.background
+
+ Text {
+ text: model[control.textRole]
+ width: parent.width
+ height: parent.height
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ color: Color.transparent(control.Universal.foreground, enabled ? 1.0 : 0.2)
+ }
+ }
+}
diff --git a/src/imports/controls/universal/VerticalHeaderView.qml b/src/imports/controls/universal/VerticalHeaderView.qml
new file mode 100644
index 00000000..80133dbd
--- /dev/null
+++ b/src/imports/controls/universal/VerticalHeaderView.qml
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2020 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the Qt Quick Controls 2 module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.15
+import QtQuick.Controls 2.15
+import QtQuick.Controls.impl 2.15
+import QtQuick.Templates 2.15 as T
+import QtQuick.Controls.Universal 2.15
+import QtQuick.Controls.Universal.impl 2.15
+
+T.VerticalHeaderView {
+ id: control
+
+ delegate: Rectangle {
+ implicitWidth: 50
+ implicitHeight: 25
+ color: control.Universal.background
+
+ Text {
+ text: model[control.textRole]
+ width: parent.width
+ height: parent.height
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ color: Color.transparent(control.Universal.foreground, enabled ? 1.0 : 0.2)
+ }
+ }
+}
diff --git a/src/imports/controls/universal/universal.pri b/src/imports/controls/universal/universal.pri
index 4440acbf..8f1b905c 100644
--- a/src/imports/controls/universal/universal.pri
+++ b/src/imports/controls/universal/universal.pri
@@ -13,6 +13,7 @@ QML_FILES += \
$$PWD/Drawer.qml \
$$PWD/Frame.qml \
$$PWD/GroupBox.qml \
+ $$PWD/HorizontalHeaderView.qml \
$$PWD/ItemDelegate.qml \
$$PWD/Label.qml \
$$PWD/Menu.qml \
@@ -48,7 +49,8 @@ QML_FILES += \
$$PWD/ToolButton.qml \
$$PWD/ToolSeparator.qml \
$$PWD/ToolTip.qml \
- $$PWD/Tumbler.qml
+ $$PWD/Tumbler.qml \
+ $$PWD/VerticalHeaderView.qml
HEADERS += \
$$PWD/qquickuniversalbusyindicator_p.h \
diff --git a/src/imports/platform/qquickplatformdialog.cpp b/src/imports/platform/qquickplatformdialog.cpp
index fc3c0429..2a785bbc 100644
--- a/src/imports/platform/qquickplatformdialog.cpp
+++ b/src/imports/platform/qquickplatformdialog.cpp
@@ -119,7 +119,7 @@ QPlatformDialogHelper *QQuickPlatformDialog::handle() const
*/
QQmlListProperty<QObject> QQuickPlatformDialog::data()
{
- return QQmlListProperty<QObject>(this, m_data);
+ return QQmlListProperty<QObject>(this, &m_data);
}
/*!
diff --git a/src/imports/platform/qquickplatformfiledialog.cpp b/src/imports/platform/qquickplatformfiledialog.cpp
index 6f212bef..4c8a0192 100644
--- a/src/imports/platform/qquickplatformfiledialog.cpp
+++ b/src/imports/platform/qquickplatformfiledialog.cpp
@@ -303,7 +303,7 @@ void QQuickPlatformFileDialog::setOptions(QFileDialogOptions::FileDialogOptions
void QQuickPlatformFileDialog::resetOptions()
{
- setOptions(0);
+ setOptions({});
}
/*!
diff --git a/src/imports/platform/qquickplatformfolderdialog.cpp b/src/imports/platform/qquickplatformfolderdialog.cpp
index b9ea0184..4ae6341e 100644
--- a/src/imports/platform/qquickplatformfolderdialog.cpp
+++ b/src/imports/platform/qquickplatformfolderdialog.cpp
@@ -186,7 +186,7 @@ void QQuickPlatformFolderDialog::setOptions(QFileDialogOptions::FileDialogOption
void QQuickPlatformFolderDialog::resetOptions()
{
- setOptions(0);
+ setOptions({});
}
/*!
diff --git a/src/imports/templates/qtquicktemplates2plugin.cpp b/src/imports/templates/qtquicktemplates2plugin.cpp
index e84db606..3b085c56 100644
--- a/src/imports/templates/qtquicktemplates2plugin.cpp
+++ b/src/imports/templates/qtquicktemplates2plugin.cpp
@@ -56,6 +56,7 @@
#include <QtQuickTemplates2/private/qquickdrawer_p.h>
#include <QtQuickTemplates2/private/qquickframe_p.h>
#include <QtQuickTemplates2/private/qquickgroupbox_p.h>
+#include <QtQuickTemplates2/private/qquickheaderview_p.h>
#include <QtQuickTemplates2/private/qquickicon_p.h>
#include <QtQuickTemplates2/private/qquickitemdelegate_p.h>
#include <QtQuickTemplates2/private/qquicklabel_p.h>
@@ -358,6 +359,13 @@ void QtQuickTemplates2Plugin::registerTypes(const char *uri)
// QtQuick.Templates 2.14 (new types and revisions in Qt 5.14)
qmlRegisterType<QQuickComboBox, 14>(uri, 2, 14, "ComboBox");
+
+ // QtQuick.Templates 2.15 (new types and revisions in Qt 5.15)
+ qmlRegisterType<QQuickComboBox, 15>(uri, 2, 15, "ComboBox");
+ // Register QQuickTableView here to expose headerView's base, with a irregular type name to 'hide' it.
+ qmlRegisterType<QQuickTableView, 15>(uri, 2, 15, "__TableView__");
+ qmlRegisterType<QQuickHorizontalHeaderView>(uri, 2, 15, "HorizontalHeaderView");
+ qmlRegisterType<QQuickVerticalHeaderView>(uri, 2, 15, "VerticalHeaderView");
}
QT_END_NAMESPACE