diff options
Diffstat (limited to 'examples/quickcontrols2/gallery')
32 files changed, 285 insertions, 173 deletions
diff --git a/examples/quickcontrols2/gallery/gallery.pro b/examples/quickcontrols2/gallery/gallery.pro index cb0736fd..45496a35 100644 --- a/examples/quickcontrols2/gallery/gallery.pro +++ b/examples/quickcontrols2/gallery/gallery.pro @@ -5,12 +5,12 @@ QT += quick quickcontrols2 SOURCES += \ gallery.cpp -OTHER_FILES += \ - gallery.qml \ - pages/*.qml - RESOURCES += \ - gallery.qrc + gallery.qml \ + qtquickcontrols2.conf \ + $$files(images/*.png) \ + $$files(images/+material/*.png) \ + $$files(pages/*.qml) target.path = $$[QT_INSTALL_EXAMPLES]/quickcontrols2/gallery INSTALLS += target diff --git a/examples/quickcontrols2/gallery/gallery.qml b/examples/quickcontrols2/gallery/gallery.qml index aadbcdec..74149e79 100644 --- a/examples/quickcontrols2/gallery/gallery.qml +++ b/examples/quickcontrols2/gallery/gallery.qml @@ -40,9 +40,9 @@ import QtQuick 2.6 import QtQuick.Layouts 1.3 -import QtQuick.Controls 2.0 -import QtQuick.Controls.Material 2.0 -import QtQuick.Controls.Universal 2.0 +import QtQuick.Controls 2.1 +import QtQuick.Controls.Material 2.1 +import QtQuick.Controls.Universal 2.1 import Qt.labs.settings 1.0 ApplicationWindow { @@ -105,7 +105,7 @@ ApplicationWindow { fillMode: Image.Pad horizontalAlignment: Image.AlignHCenter verticalAlignment: Image.AlignVCenter - source: "qrc:/images/menu.png" + source: "images/menu.png" } onClicked: optionsMenu.open() @@ -116,7 +116,7 @@ ApplicationWindow { MenuItem { text: "Settings" - onTriggered: settingsPopup.open() + onTriggered: settingsDialog.open() } MenuItem { text: "About" @@ -157,6 +157,7 @@ ApplicationWindow { ListElement { title: "CheckBox"; source: "qrc:/pages/CheckBoxPage.qml" } ListElement { title: "ComboBox"; source: "qrc:/pages/ComboBoxPage.qml" } ListElement { title: "Dial"; source: "qrc:/pages/DialPage.qml" } + ListElement { title: "Dialog"; source: "qrc:/pages/DialogPage.qml" } ListElement { title: "Delegates"; source: "qrc:/pages/DelegatePage.qml" } ListElement { title: "Drawer"; source: "qrc:/pages/DrawerPage.qml" } ListElement { title: "Frame"; source: "qrc:/pages/FramePage.qml" } @@ -199,7 +200,7 @@ ApplicationWindow { anchors.centerIn: parent anchors.verticalCenterOffset: -50 fillMode: Image.PreserveAspectFit - source: "qrc:/images/qt-logo.png" + source: "images/qt-logo.png" } Label { @@ -216,31 +217,36 @@ ApplicationWindow { Image { id: arrow - source: "qrc:/images/arrow.png" + source: "images/arrow.png" anchors.left: parent.left anchors.bottom: parent.bottom } } } - Popup { - id: settingsPopup - x: (window.width - width) / 2 - y: window.height / 6 - width: Math.min(window.width, window.height) / 3 * 2 - height: settingsColumn.implicitHeight + topPadding + bottomPadding + Dialog { + id: settingsDialog + x: Math.round((window.width - width) / 2) + y: Math.round(window.height / 6) + width: Math.round(Math.min(window.width, window.height) / 3 * 2) modal: true focus: true + title: "Settings" + + standardButtons: Dialog.Ok | Dialog.Cancel + onAccepted: { + settings.style = styleBox.displayText + settingsDialog.close() + } + onRejected: { + styleBox.currentIndex = styleBox.styleIndex + settingsDialog.close() + } contentItem: ColumnLayout { id: settingsColumn spacing: 20 - Label { - text: "Settings" - font.bold: true - } - RowLayout { spacing: 10 @@ -270,48 +276,14 @@ ApplicationWindow { Layout.fillWidth: true Layout.fillHeight: true } - - RowLayout { - spacing: 10 - - Button { - id: okButton - text: "Ok" - onClicked: { - settings.style = styleBox.displayText - settingsPopup.close() - } - - Material.foreground: Material.primary - Material.background: "transparent" - Material.elevation: 0 - - Layout.preferredWidth: 0 - Layout.fillWidth: true - } - - Button { - id: cancelButton - text: "Cancel" - onClicked: { - styleBox.currentIndex = styleBox.styleIndex - settingsPopup.close() - } - - Material.background: "transparent" - Material.elevation: 0 - - Layout.preferredWidth: 0 - Layout.fillWidth: true - } - } } } - Popup { + Dialog { id: aboutDialog modal: true focus: true + title: "About" x: (window.width - width) / 2 y: window.height / 6 width: Math.min(window.width, window.height) / 3 * 2 @@ -322,11 +294,6 @@ ApplicationWindow { spacing: 20 Label { - text: "About" - font.bold: true - } - - Label { width: aboutDialog.availableWidth text: "The Qt Quick Controls 2 module delivers the next generation user interface controls based on Qt Quick." wrapMode: Label.Wrap diff --git a/examples/quickcontrols2/gallery/gallery.qrc b/examples/quickcontrols2/gallery/gallery.qrc deleted file mode 100644 index 2dc78732..00000000 --- a/examples/quickcontrols2/gallery/gallery.qrc +++ /dev/null @@ -1,70 +0,0 @@ -<RCC> - <qresource prefix="/"> - <file>gallery.qml</file> - <file>qtquickcontrols2.conf</file> - <file>images/arrow.png</file> - <file>images/arrow@2x.png</file> - <file>images/arrow@3x.png</file> - <file>images/arrow@4x.png</file> - <file>images/arrows.png</file> - <file>images/arrows@2x.png</file> - <file>images/arrows@3x.png</file> - <file>images/arrows@4x.png</file> - <file>images/back.png</file> - <file>images/back@2x.png</file> - <file>images/back@3x.png</file> - <file>images/back@4x.png</file> - <file>images/drawer.png</file> - <file>images/drawer@2x.png</file> - <file>images/drawer@3x.png</file> - <file>images/drawer@4x.png</file> - <file>images/menu.png</file> - <file>images/menu@2x.png</file> - <file>images/menu@3x.png</file> - <file>images/menu@4x.png</file> - <file>images/+material/back.png</file> - <file>images/+material/back@2x.png</file> - <file>images/+material/back@3x.png</file> - <file>images/+material/back@4x.png</file> - <file>images/+material/drawer.png</file> - <file>images/+material/drawer@2x.png</file> - <file>images/+material/drawer@3x.png</file> - <file>images/+material/drawer@4x.png</file> - <file>images/+material/menu.png</file> - <file>images/+material/menu@2x.png</file> - <file>images/+material/menu@3x.png</file> - <file>images/+material/menu@4x.png</file> - <file>images/qt-logo.png</file> - <file>images/qt-logo@2x.png</file> - <file>images/qt-logo@3x.png</file> - <file>images/qt-logo@4x.png</file> - <file>pages/BusyIndicatorPage.qml</file> - <file>pages/ButtonPage.qml</file> - <file>pages/CheckBoxPage.qml</file> - <file>pages/ComboBoxPage.qml</file> - <file>pages/DialPage.qml</file> - <file>pages/DrawerPage.qml</file> - <file>pages/FramePage.qml</file> - <file>pages/GroupBoxPage.qml</file> - <file>pages/MenuPage.qml</file> - <file>pages/PageIndicatorPage.qml</file> - <file>pages/PopupPage.qml</file> - <file>pages/ProgressBarPage.qml</file> - <file>pages/RadioButtonPage.qml</file> - <file>pages/RangeSliderPage.qml</file> - <file>pages/ScrollablePage.qml</file> - <file>pages/ScrollBarPage.qml</file> - <file>pages/ScrollIndicatorPage.qml</file> - <file>pages/SliderPage.qml</file> - <file>pages/SpinBoxPage.qml</file> - <file>pages/StackViewPage.qml</file> - <file>pages/SwipeViewPage.qml</file> - <file>pages/SwitchPage.qml</file> - <file>pages/TabBarPage.qml</file> - <file>pages/TextAreaPage.qml</file> - <file>pages/TextFieldPage.qml</file> - <file>pages/ToolTipPage.qml</file> - <file>pages/TumblerPage.qml</file> - <file>pages/DelegatePage.qml</file> - </qresource> -</RCC> diff --git a/examples/quickcontrols2/gallery/pages/BusyIndicatorPage.qml b/examples/quickcontrols2/gallery/pages/BusyIndicatorPage.qml index 26950555..d9e5f788 100644 --- a/examples/quickcontrols2/gallery/pages/BusyIndicatorPage.qml +++ b/examples/quickcontrols2/gallery/pages/BusyIndicatorPage.qml @@ -39,7 +39,7 @@ ****************************************************************************/ import QtQuick 2.6 -import QtQuick.Controls 2.0 +import QtQuick.Controls 2.1 ScrollablePage { id: page diff --git a/examples/quickcontrols2/gallery/pages/ButtonPage.qml b/examples/quickcontrols2/gallery/pages/ButtonPage.qml index add29e83..7e945fa1 100644 --- a/examples/quickcontrols2/gallery/pages/ButtonPage.qml +++ b/examples/quickcontrols2/gallery/pages/ButtonPage.qml @@ -39,7 +39,7 @@ ****************************************************************************/ import QtQuick 2.6 -import QtQuick.Controls 2.0 +import QtQuick.Controls 2.1 ScrollablePage { id: page diff --git a/examples/quickcontrols2/gallery/pages/CheckBoxPage.qml b/examples/quickcontrols2/gallery/pages/CheckBoxPage.qml index ee8b14dc..8d48d32d 100644 --- a/examples/quickcontrols2/gallery/pages/CheckBoxPage.qml +++ b/examples/quickcontrols2/gallery/pages/CheckBoxPage.qml @@ -39,7 +39,7 @@ ****************************************************************************/ import QtQuick 2.6 -import QtQuick.Controls 2.0 +import QtQuick.Controls 2.1 ScrollablePage { id: page diff --git a/examples/quickcontrols2/gallery/pages/ComboBoxPage.qml b/examples/quickcontrols2/gallery/pages/ComboBoxPage.qml index 66fb10dd..c800ba73 100644 --- a/examples/quickcontrols2/gallery/pages/ComboBoxPage.qml +++ b/examples/quickcontrols2/gallery/pages/ComboBoxPage.qml @@ -39,7 +39,7 @@ ****************************************************************************/ import QtQuick 2.6 -import QtQuick.Controls 2.0 +import QtQuick.Controls 2.1 ScrollablePage { id: page diff --git a/examples/quickcontrols2/gallery/pages/DelegatePage.qml b/examples/quickcontrols2/gallery/pages/DelegatePage.qml index 3d175fd8..525487d1 100644 --- a/examples/quickcontrols2/gallery/pages/DelegatePage.qml +++ b/examples/quickcontrols2/gallery/pages/DelegatePage.qml @@ -40,7 +40,7 @@ import QtQuick 2.6 import QtQuick.Layouts 1.1 -import QtQuick.Controls 2.0 +import QtQuick.Controls 2.1 Pane { padding: 0 @@ -70,17 +70,17 @@ Pane { text: labelText width: parent.width - onClicked: if (swipe.complete) view.model.remove(ourIndex) - Component { id: removeComponent Rectangle { - color: swipeDelegate.swipe.complete && swipeDelegate.pressed ? "#333" : "#444" + color: SwipeDelegate.pressed ? "#333" : "#444" width: parent.width height: parent.height clip: true + SwipeDelegate.onClicked: view.model.remove(ourIndex) + Label { font.pixelSize: swipeDelegate.font.pixelSize text: "Remove" diff --git a/examples/quickcontrols2/gallery/pages/DialPage.qml b/examples/quickcontrols2/gallery/pages/DialPage.qml index 9f07c11e..b60fa032 100644 --- a/examples/quickcontrols2/gallery/pages/DialPage.qml +++ b/examples/quickcontrols2/gallery/pages/DialPage.qml @@ -39,7 +39,7 @@ ****************************************************************************/ import QtQuick 2.6 -import QtQuick.Controls 2.0 +import QtQuick.Controls 2.1 ScrollablePage { id: page diff --git a/examples/quickcontrols2/gallery/pages/DialogPage.qml b/examples/quickcontrols2/gallery/pages/DialogPage.qml new file mode 100644 index 00000000..e9a051a3 --- /dev/null +++ b/examples/quickcontrols2/gallery/pages/DialogPage.qml @@ -0,0 +1,216 @@ +/**************************************************************************** +** +** Copyright (C) 2016 The Qt Company Ltd. +** Contact: http://www.qt.io/licensing/ +** +** This file is part of the examples 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.6 +import QtQuick.Layouts 1.0 +import QtQuick.Controls 2.1 + +ScrollablePage { + id: page + + readonly property int buttonWidth: Math.max(button.implicitWidth, Math.min(button.implicitWidth * 2, page.availableWidth / 3)) + + Column { + spacing: 40 + width: parent.width + + Label { + width: parent.width + wrapMode: Label.Wrap + horizontalAlignment: Qt.AlignHCenter + text: "Dialog is a popup that is mostly used for short-term tasks " + + "and brief communications with the user." + } + + Button { + text: "Message" + anchors.horizontalCenter: parent.horizontalCenter + width: buttonWidth + onClicked: messageDialog.open() + + Dialog { + id: messageDialog + + x: (parent.width - width) / 2 + y: (parent.height - height) / 2 + + title: "Message" + + Label { + text: "Lorem ipsum dolor sit amet..." + } + } + } + + Button { + id: button + text: "Confirmation" + anchors.horizontalCenter: parent.horizontalCenter + width: buttonWidth + onClicked: confirmationDialog.open() + + Dialog { + id: confirmationDialog + + x: (parent.width - width) / 2 + y: (parent.height - height) / 2 + parent: ApplicationWindow.overlay + + modal: true + title: "Confirmation" + standardButtons: Dialog.Yes | Dialog.No + + Column { + spacing: 20 + anchors.fill: parent + Label { + text: "The document has been modified.\nDo you want to save your changes?" + } + CheckBox { + text: "Do not ask again" + anchors.right: parent.right + } + } + } + } + + Button { + text: "Content" + anchors.horizontalCenter: parent.horizontalCenter + width: buttonWidth + onClicked: contentDialog.open() + + Dialog { + id: contentDialog + + x: (parent.width - width) / 2 + y: (parent.height - height) / 2 + width: Math.min(page.width, page.height) / 3 * 2 + contentHeight: logo.height * 2 + parent: ApplicationWindow.overlay + + modal: true + title: "Content" + standardButtons: Dialog.Close + + Flickable { + id: flickable + clip: true + anchors.fill: parent + contentHeight: column.height + + Column { + id: column + spacing: 20 + width: parent.width + + Image { + id: logo + width: parent.width / 2 + anchors.horizontalCenter: parent.horizontalCenter + fillMode: Image.PreserveAspectFit + source: "../images/qt-logo.png" + } + + Label { + width: parent.width + text: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc finibus " + + "in est quis laoreet. Interdum et malesuada fames ac ante ipsum primis " + + "in faucibus. Curabitur eget justo sollicitudin enim faucibus bibendum. " + + "Suspendisse potenti. Vestibulum cursus consequat mauris id sollicitudin. " + + "Duis facilisis hendrerit consectetur. Curabitur sapien tortor, efficitur " + + "id auctor nec, efficitur et nisl. Ut venenatis eros in nunc placerat, " + + "eu aliquam enim suscipit." + wrapMode: Label.Wrap + } + } + + ScrollIndicator.vertical: ScrollIndicator { + parent: contentDialog.contentItem + anchors.top: flickable.top + anchors.bottom: flickable.bottom + anchors.right: parent.right + anchors.rightMargin: -contentDialog.rightPadding + 1 + } + } + } + } + + Button { + text: "Input" + anchors.horizontalCenter: parent.horizontalCenter + width: buttonWidth + onClicked: inputDialog.open() + + Dialog { + id: inputDialog + + x: (parent.width - width) / 2 + y: (parent.height - height) / 2 + parent: ApplicationWindow.overlay + + focus: true + modal: true + title: "Input" + standardButtons: Dialog.Ok | Dialog.Cancel + + ColumnLayout { + spacing: 20 + anchors.fill: parent + Label { + elide: Label.ElideRight + text: "Please enter the credentials:" + Layout.fillWidth: true + } + TextField { + focus: true + placeholderText: "Username" + Layout.fillWidth: true + } + TextField { + placeholderText: "Password" + echoMode: TextField.PasswordEchoOnEdit + Layout.fillWidth: true + } + } + } + } + } +} diff --git a/examples/quickcontrols2/gallery/pages/DrawerPage.qml b/examples/quickcontrols2/gallery/pages/DrawerPage.qml index f4a7d272..9e77223c 100644 --- a/examples/quickcontrols2/gallery/pages/DrawerPage.qml +++ b/examples/quickcontrols2/gallery/pages/DrawerPage.qml @@ -39,7 +39,7 @@ ****************************************************************************/ import QtQuick 2.6 -import QtQuick.Controls 2.0 +import QtQuick.Controls 2.1 Pane { id: pane @@ -66,7 +66,7 @@ Pane { } Image { - source: "qrc:/images/arrow.png" + source: "../images/arrow.png" anchors.left: parent.left anchors.bottom: parent.bottom } diff --git a/examples/quickcontrols2/gallery/pages/FramePage.qml b/examples/quickcontrols2/gallery/pages/FramePage.qml index 51b640c1..b2d24dff 100644 --- a/examples/quickcontrols2/gallery/pages/FramePage.qml +++ b/examples/quickcontrols2/gallery/pages/FramePage.qml @@ -39,7 +39,7 @@ ****************************************************************************/ import QtQuick 2.6 -import QtQuick.Controls 2.0 +import QtQuick.Controls 2.1 ScrollablePage { id: page diff --git a/examples/quickcontrols2/gallery/pages/GroupBoxPage.qml b/examples/quickcontrols2/gallery/pages/GroupBoxPage.qml index b0db5374..c4ceb45d 100644 --- a/examples/quickcontrols2/gallery/pages/GroupBoxPage.qml +++ b/examples/quickcontrols2/gallery/pages/GroupBoxPage.qml @@ -39,7 +39,7 @@ ****************************************************************************/ import QtQuick 2.6 -import QtQuick.Controls 2.0 +import QtQuick.Controls 2.1 ScrollablePage { id: page diff --git a/examples/quickcontrols2/gallery/pages/MenuPage.qml b/examples/quickcontrols2/gallery/pages/MenuPage.qml index 1e975bd0..49e6da07 100644 --- a/examples/quickcontrols2/gallery/pages/MenuPage.qml +++ b/examples/quickcontrols2/gallery/pages/MenuPage.qml @@ -39,7 +39,7 @@ ****************************************************************************/ import QtQuick 2.6 -import QtQuick.Controls 2.0 +import QtQuick.Controls 2.1 ScrollablePage { id: page diff --git a/examples/quickcontrols2/gallery/pages/PageIndicatorPage.qml b/examples/quickcontrols2/gallery/pages/PageIndicatorPage.qml index e7f7e251..43982b43 100644 --- a/examples/quickcontrols2/gallery/pages/PageIndicatorPage.qml +++ b/examples/quickcontrols2/gallery/pages/PageIndicatorPage.qml @@ -39,7 +39,7 @@ ****************************************************************************/ import QtQuick 2.6 -import QtQuick.Controls 2.0 +import QtQuick.Controls 2.1 ScrollablePage { id: page diff --git a/examples/quickcontrols2/gallery/pages/PopupPage.qml b/examples/quickcontrols2/gallery/pages/PopupPage.qml index 66c46143..ac3b02b7 100644 --- a/examples/quickcontrols2/gallery/pages/PopupPage.qml +++ b/examples/quickcontrols2/gallery/pages/PopupPage.qml @@ -39,7 +39,7 @@ ****************************************************************************/ import QtQuick 2.6 -import QtQuick.Controls 2.0 +import QtQuick.Controls 2.1 ScrollablePage { id: page @@ -62,7 +62,7 @@ ScrollablePage { anchors.horizontalCenter: parent.horizontalCenter width: Math.max(implicitWidth, Math.min(implicitWidth * 2, page.availableWidth / 3)) - onClicked: settingsPopup.open() + onClicked: settingsDialog.open() } } } diff --git a/examples/quickcontrols2/gallery/pages/ProgressBarPage.qml b/examples/quickcontrols2/gallery/pages/ProgressBarPage.qml index 92f26dd0..1548192f 100644 --- a/examples/quickcontrols2/gallery/pages/ProgressBarPage.qml +++ b/examples/quickcontrols2/gallery/pages/ProgressBarPage.qml @@ -39,7 +39,7 @@ ****************************************************************************/ import QtQuick 2.6 -import QtQuick.Controls 2.0 +import QtQuick.Controls 2.1 ScrollablePage { id: page diff --git a/examples/quickcontrols2/gallery/pages/RadioButtonPage.qml b/examples/quickcontrols2/gallery/pages/RadioButtonPage.qml index 0cc1f0bd..452d0425 100644 --- a/examples/quickcontrols2/gallery/pages/RadioButtonPage.qml +++ b/examples/quickcontrols2/gallery/pages/RadioButtonPage.qml @@ -39,7 +39,7 @@ ****************************************************************************/ import QtQuick 2.6 -import QtQuick.Controls 2.0 +import QtQuick.Controls 2.1 ScrollablePage { id: page diff --git a/examples/quickcontrols2/gallery/pages/RangeSliderPage.qml b/examples/quickcontrols2/gallery/pages/RangeSliderPage.qml index 62cbeb88..6a74e348 100644 --- a/examples/quickcontrols2/gallery/pages/RangeSliderPage.qml +++ b/examples/quickcontrols2/gallery/pages/RangeSliderPage.qml @@ -39,7 +39,7 @@ ****************************************************************************/ import QtQuick 2.6 -import QtQuick.Controls 2.0 +import QtQuick.Controls 2.1 ScrollablePage { id: page diff --git a/examples/quickcontrols2/gallery/pages/ScrollBarPage.qml b/examples/quickcontrols2/gallery/pages/ScrollBarPage.qml index f8f617d7..17be84e6 100644 --- a/examples/quickcontrols2/gallery/pages/ScrollBarPage.qml +++ b/examples/quickcontrols2/gallery/pages/ScrollBarPage.qml @@ -39,7 +39,7 @@ ****************************************************************************/ import QtQuick 2.6 -import QtQuick.Controls 2.0 +import QtQuick.Controls 2.1 Flickable { id: flickable @@ -67,7 +67,7 @@ Flickable { Image { rotation: 90 - source: "qrc:/images/arrows.png" + source: "../images/arrows.png" anchors.horizontalCenter: parent.horizontalCenter } } diff --git a/examples/quickcontrols2/gallery/pages/ScrollIndicatorPage.qml b/examples/quickcontrols2/gallery/pages/ScrollIndicatorPage.qml index d76d2de3..f7c23a06 100644 --- a/examples/quickcontrols2/gallery/pages/ScrollIndicatorPage.qml +++ b/examples/quickcontrols2/gallery/pages/ScrollIndicatorPage.qml @@ -39,7 +39,7 @@ ****************************************************************************/ import QtQuick 2.6 -import QtQuick.Controls 2.0 +import QtQuick.Controls 2.1 Flickable { id: flickable @@ -67,7 +67,7 @@ Flickable { Image { rotation: 90 - source: "qrc:/images/arrows.png" + source: "../images/arrows.png" anchors.horizontalCenter: parent.horizontalCenter } } diff --git a/examples/quickcontrols2/gallery/pages/SliderPage.qml b/examples/quickcontrols2/gallery/pages/SliderPage.qml index d9853c22..03cb7696 100644 --- a/examples/quickcontrols2/gallery/pages/SliderPage.qml +++ b/examples/quickcontrols2/gallery/pages/SliderPage.qml @@ -39,7 +39,7 @@ ****************************************************************************/ import QtQuick 2.6 -import QtQuick.Controls 2.0 +import QtQuick.Controls 2.1 ScrollablePage { id: page diff --git a/examples/quickcontrols2/gallery/pages/SpinBoxPage.qml b/examples/quickcontrols2/gallery/pages/SpinBoxPage.qml index 2b3664cf..c75982c2 100644 --- a/examples/quickcontrols2/gallery/pages/SpinBoxPage.qml +++ b/examples/quickcontrols2/gallery/pages/SpinBoxPage.qml @@ -39,7 +39,7 @@ ****************************************************************************/ import QtQuick 2.6 -import QtQuick.Controls 2.0 +import QtQuick.Controls 2.1 ScrollablePage { id: page diff --git a/examples/quickcontrols2/gallery/pages/StackViewPage.qml b/examples/quickcontrols2/gallery/pages/StackViewPage.qml index 4e44c3c8..d99a4b93 100644 --- a/examples/quickcontrols2/gallery/pages/StackViewPage.qml +++ b/examples/quickcontrols2/gallery/pages/StackViewPage.qml @@ -39,7 +39,7 @@ ****************************************************************************/ import QtQuick 2.6 -import QtQuick.Controls 2.0 +import QtQuick.Controls 2.1 StackView { id: stackView diff --git a/examples/quickcontrols2/gallery/pages/SwipeViewPage.qml b/examples/quickcontrols2/gallery/pages/SwipeViewPage.qml index d0b0486c..dedacac4 100644 --- a/examples/quickcontrols2/gallery/pages/SwipeViewPage.qml +++ b/examples/quickcontrols2/gallery/pages/SwipeViewPage.qml @@ -39,7 +39,7 @@ ****************************************************************************/ import QtQuick 2.6 -import QtQuick.Controls 2.0 +import QtQuick.Controls 2.1 Pane { id: pane @@ -69,7 +69,7 @@ Pane { } Image { - source: "qrc:/images/arrows.png" + source: "../images/arrows.png" anchors.horizontalCenter: parent.horizontalCenter } } diff --git a/examples/quickcontrols2/gallery/pages/SwitchPage.qml b/examples/quickcontrols2/gallery/pages/SwitchPage.qml index 1315268d..ccaa4e1e 100644 --- a/examples/quickcontrols2/gallery/pages/SwitchPage.qml +++ b/examples/quickcontrols2/gallery/pages/SwitchPage.qml @@ -39,7 +39,7 @@ ****************************************************************************/ import QtQuick 2.6 -import QtQuick.Controls 2.0 +import QtQuick.Controls 2.1 ScrollablePage { id: page diff --git a/examples/quickcontrols2/gallery/pages/TabBarPage.qml b/examples/quickcontrols2/gallery/pages/TabBarPage.qml index 1b5bdb9b..818cccef 100644 --- a/examples/quickcontrols2/gallery/pages/TabBarPage.qml +++ b/examples/quickcontrols2/gallery/pages/TabBarPage.qml @@ -39,7 +39,7 @@ ****************************************************************************/ import QtQuick 2.6 -import QtQuick.Controls 2.0 +import QtQuick.Controls 2.1 Page { id: page @@ -69,7 +69,7 @@ Page { } Image { - source: "qrc:/images/arrows.png" + source: "../images/arrows.png" anchors.horizontalCenter: parent.horizontalCenter } } diff --git a/examples/quickcontrols2/gallery/pages/TextAreaPage.qml b/examples/quickcontrols2/gallery/pages/TextAreaPage.qml index ca28e2b7..97669f2f 100644 --- a/examples/quickcontrols2/gallery/pages/TextAreaPage.qml +++ b/examples/quickcontrols2/gallery/pages/TextAreaPage.qml @@ -39,7 +39,7 @@ ****************************************************************************/ import QtQuick 2.6 -import QtQuick.Controls 2.0 +import QtQuick.Controls 2.1 ScrollablePage { id: page diff --git a/examples/quickcontrols2/gallery/pages/TextFieldPage.qml b/examples/quickcontrols2/gallery/pages/TextFieldPage.qml index 9092e10d..9917da33 100644 --- a/examples/quickcontrols2/gallery/pages/TextFieldPage.qml +++ b/examples/quickcontrols2/gallery/pages/TextFieldPage.qml @@ -39,7 +39,7 @@ ****************************************************************************/ import QtQuick 2.6 -import QtQuick.Controls 2.0 +import QtQuick.Controls 2.1 ScrollablePage { id: page diff --git a/examples/quickcontrols2/gallery/pages/ToolTipPage.qml b/examples/quickcontrols2/gallery/pages/ToolTipPage.qml index e0f769eb..98ecd92e 100644 --- a/examples/quickcontrols2/gallery/pages/ToolTipPage.qml +++ b/examples/quickcontrols2/gallery/pages/ToolTipPage.qml @@ -39,7 +39,7 @@ ****************************************************************************/ import QtQuick 2.6 -import QtQuick.Controls 2.0 +import QtQuick.Controls 2.1 ScrollablePage { id: page diff --git a/examples/quickcontrols2/gallery/pages/TumblerPage.qml b/examples/quickcontrols2/gallery/pages/TumblerPage.qml index d12cc999..3b290dcb 100644 --- a/examples/quickcontrols2/gallery/pages/TumblerPage.qml +++ b/examples/quickcontrols2/gallery/pages/TumblerPage.qml @@ -39,7 +39,7 @@ ****************************************************************************/ import QtQuick 2.6 -import QtQuick.Controls 2.0 +import QtQuick.Controls 2.1 ScrollablePage { id: page @@ -57,7 +57,6 @@ ScrollablePage { Tumbler { model: 10 - visibleItemCount: 5 anchors.horizontalCenter: parent.horizontalCenter } } diff --git a/examples/quickcontrols2/gallery/qtquickcontrols2.conf b/examples/quickcontrols2/gallery/qtquickcontrols2.conf index ce348f2e..da1a8f41 100644 --- a/examples/quickcontrols2/gallery/qtquickcontrols2.conf +++ b/examples/quickcontrols2/gallery/qtquickcontrols2.conf @@ -1,8 +1,8 @@ [Material] Primary=#41cd52 Accent=#41cd52 -Theme=Light +Theme=System [Universal] Accent=#41cd52 -Theme=Light +Theme=System |