diff options
author | Michal Klocek <michal.klocek@qt.io> | 2023-03-20 08:46:13 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-03-22 12:48:47 +0000 |
commit | b71403faeedf2955e3af541f9e140305af9ba0a8 (patch) | |
tree | 5c3537c500c5c65dc473c9fd3e2d45b327fdcd95 /examples/webenginequick/customdialogs/forms | |
parent | 7d9805df3a471e7172bf72ff1bc08c63ccfd67fa (diff) | |
download | qtwebengine-b71403faeedf2955e3af541f9e140305af9ba0a8.tar.gz |
Move custom dialogs example to manual tests
This example shows how to use dialogs, however documentation
already provides snippets for that added in 3cbe59e29a.
The only missing one was tooltip, therefore add missing snippet
and move example to manual tests.
Task-number: QTBUG-108751
Change-Id: I84eda805455fb0276046ed1089389d605a8af672
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
(cherry picked from commit 6bf30525ee49d270dae6a6440bc607513f21237c)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'examples/webenginequick/customdialogs/forms')
16 files changed, 0 insertions, 1024 deletions
diff --git a/examples/webenginequick/customdialogs/forms/Authentication.qml b/examples/webenginequick/customdialogs/forms/Authentication.qml deleted file mode 100644 index 151a7c4aa..000000000 --- a/examples/webenginequick/customdialogs/forms/Authentication.qml +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause - -import QtQuick -import QtWebEngine - -AuthenticationForm { - property QtObject request - signal closeForm() - - cancelButton.onClicked: { - request.dialogReject(); - closeForm(); - } - - loginButton.onClicked: { - request.dialogReject(); - closeForm(); - } - - Component.onCompleted: { - switch (request.type) { - case AuthenticationDialogRequest.AuthenticationTypeHTTP: - console.log("HTTP Authentication Required. Host says: " + request.realm); - break; - case AuthenticationDialogRequest.AuthenticationTypeProxy: - console.log("Proxy Authentication Required for: " + request.proxyHost); - break; - } - } -} diff --git a/examples/webenginequick/customdialogs/forms/AuthenticationForm.ui.qml b/examples/webenginequick/customdialogs/forms/AuthenticationForm.ui.qml deleted file mode 100644 index f14986b20..000000000 --- a/examples/webenginequick/customdialogs/forms/AuthenticationForm.ui.qml +++ /dev/null @@ -1,137 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause - -import QtQuick -import QtQuick.Layouts -import QtQuick.Controls - -Item { - id: item1 - property alias cancelButton: cancelButton - property alias loginButton: loginButton - property alias userName: userName - property alias password: password - - ColumnLayout { - id: columnLayout - anchors.topMargin: 20 - anchors.top: parent.top - anchors.bottomMargin: 20 - anchors.bottom: parent.bottom - anchors.rightMargin: 20 - anchors.right: parent.right - anchors.leftMargin: 20 - anchors.left: parent.left - - Image { - id: image - Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter - source: "qrc:/icon.svg" - } - - Rectangle { - id: rectangle - width: parent.width - height: 30 - Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter - gradient: Gradient { - GradientStop { - position: 0 - color: "#25a6e2" - } - GradientStop { - color: "#188bd0" - } - } - - Text { - id: textArea - x: 54 - y: 5 - color: "#ffffff" - text: qsTr("Restricted Area") - font.pointSize: 12 - anchors.horizontalCenter: parent.horizontalCenter - anchors.verticalCenter: parent.verticalCenter - } - } - - Item { - width: 40 - height: 40 - } - - Text { - id: userNameText - text: qsTr("Username:") - font.pointSize: 12 - } - - TextField { - id: userName - width: 300 - height: 22 - Layout.fillWidth: true - font.pointSize: 12 - color: "black" - - background: Rectangle { - color: "white" - border.color: "black" - border.width: 1 - } - } - - Text { - id: passwordText - text: qsTr("Password:") - font.pointSize: 12 - } - - TextField { - id: password - width: 300 - height: 26 - Layout.fillWidth: true - font.pointSize: 12 - color: "black" - echoMode: TextInput.Password - - background: Rectangle { - color: "white" - border.color: "black" - border.width: 1 - } - } - - Item { - Layout.fillHeight: true - } - - RowLayout { - id: rowLayout - width: 100 - height: 100 - - Item { - Layout.fillWidth: true - } - - CustomButton { - id: cancelButton - width: 90 - height: 30 - btnText: qsTr("Cancel") - btnBlue: false - } - - CustomButton { - id: loginButton - width: 90 - height: 30 - btnText: qsTr("Login") - btnBlue: false - } - } - } -} diff --git a/examples/webenginequick/customdialogs/forms/ColorCell.qml b/examples/webenginequick/customdialogs/forms/ColorCell.qml deleted file mode 100644 index 57151780c..000000000 --- a/examples/webenginequick/customdialogs/forms/ColorCell.qml +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause - -import QtQuick - -Rectangle { - id: rectangle - width: 50 - height: 50 - signal clicked() - MouseArea { - id: mouseArea - anchors.fill: parent - onClicked: rectangle.clicked() - } -} diff --git a/examples/webenginequick/customdialogs/forms/ColorPicker.qml b/examples/webenginequick/customdialogs/forms/ColorPicker.qml deleted file mode 100644 index 63269ddff..000000000 --- a/examples/webenginequick/customdialogs/forms/ColorPicker.qml +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause - -import QtQuick - -ColorPickerForm { - property QtObject request - signal closeForm() - - okButton.onClicked: { - request.dialogAccept(colorPicker.color); - closeForm(); - } - - cancelButton.onClicked: { - request.dialogReject(); - closeForm(); - } - - function createCallback(color) { - return function() { colorPicker.color = color }; - } - - Component.onCompleted:{ - for (var i = 0; i < grid.children.length; i++) { - var cell = grid.children[i]; - cell.clicked.connect(createCallback(cell.color)); - } - colorPicker.color = request.color; - } -} diff --git a/examples/webenginequick/customdialogs/forms/ColorPickerForm.ui.qml b/examples/webenginequick/customdialogs/forms/ColorPickerForm.ui.qml deleted file mode 100644 index 060aeef7d..000000000 --- a/examples/webenginequick/customdialogs/forms/ColorPickerForm.ui.qml +++ /dev/null @@ -1,186 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause - -import QtQuick -import QtQuick.Layouts - -Item { - property alias cancelButton: cancelButton - property alias okButton: okButton - property string message: "Message" - property string title: "Title" - property alias blue1: blue1 - property alias grid: grid - property alias colorPicker: colorPicker - - ColumnLayout { - id: columnLayout - anchors.topMargin: 20 - anchors.top: parent.top - anchors.bottomMargin: 20 - anchors.bottom: parent.bottom - anchors.rightMargin: 20 - anchors.right: parent.right - anchors.leftMargin: 20 - anchors.left: parent.left - - Image { - Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter - source: "qrc:/icon.svg" - } - - Rectangle { - width: parent.width - height: 30 - Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter - gradient: Gradient { - GradientStop { - position: 0 - color: "#25a6e2" - } - - GradientStop { - color: "#188bd0" - } - } - - Text { - id: title - x: 54 - y: 5 - color: "#ffffff" - text: qsTr("Select Color") - font.pointSize: 12 - anchors.horizontalCenter: parent.horizontalCenter - anchors.verticalCenter: parent.verticalCenter - } - } - - Item { - width: 40 - height: 40 - } - - GridLayout { - id: grid - columns: 5 - Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter - - ColorCell { - id: blue1 - color: "#26d5f8" - } - ColorCell { - id: green1 - color: "#25f93d" - } - ColorCell { - id: red1 - color: "#f71111" - } - ColorCell { - id: yellow1 - color: "#faf23c" - } - ColorCell { - id: orange1 - color: "#ec8505" - } - ColorCell { - id: blue2 - color: "#037eaa" - } - ColorCell { - id: green2 - color: "#389a13" - } - ColorCell { - id: red2 - color: "#b2001b" - } - ColorCell { - id: yellow2 - color: "#caca03" - } - ColorCell { - id: orange2 - color: "#bb4900" - } - ColorCell { - id: blue3 - color: "#01506c" - } - ColorCell { - id: green3 - color: "#37592b" - } - ColorCell { - id: red3 - color: "#700113" - } - ColorCell { - id: yellow3 - color: "#848404" - } - - ColorCell { - id: orange3 - color: "#563100" - } - } - - Item { - width: 10 - height: 10 - } - - Rectangle { - width: 90 - height: 90 - color: "#000000" - radius: 4 - Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter - - Rectangle { - id: colorPicker - height: 80 - color: "#ffffff" - anchors.rightMargin: 5 - anchors.leftMargin: 5 - anchors.bottomMargin: 5 - anchors.topMargin: 5 - anchors.fill: parent - } - } - - Item { - Layout.fillHeight: true - } - - RowLayout { - id: rowLayout - width: 100 - height: 100 - - Item { - Layout.fillWidth: true - } - - CustomButton { - id: cancelButton - width: 90 - height: 30 - btnText: qsTr("Cancel") - btnBlue: false - } - - CustomButton { - id: okButton - width: 90 - height: 30 - btnText: qsTr("OK") - btnBlue: false - } - } - } -} diff --git a/examples/webenginequick/customdialogs/forms/CustomButton.qml b/examples/webenginequick/customdialogs/forms/CustomButton.qml deleted file mode 100644 index 00a06d558..000000000 --- a/examples/webenginequick/customdialogs/forms/CustomButton.qml +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause - -import QtQuick - -Rectangle { - id: root - width: 200 - height: 30 - radius: 5 - property string btnText: "Name" - property bool btnEnable: true - property bool btnBlue: true - opacity: btnEnable ? 1.0 : 0.5 - signal clicked() - gradient: btnBlue ? blueButton : greenButton - Text { - id: textArea - x: 54 - y: 5 - color: "#ffffff" - text: parent.btnText - font.pointSize: 12 - anchors.horizontalCenter: parent.horizontalCenter - anchors.verticalCenter: parent.verticalCenter - font.bold: false - } - - MouseArea { - id: mouseArea - anchors.fill: parent - onClicked: { - if (btnEnable) - root.clicked(); - } - } - - Gradient { - id: blueButton - GradientStop { - position: 0 - color: "#25a6e2" - } - GradientStop { - position: mouseArea.pressed && root.btnEnable ? 0.7 :1 - color: "#188bd0" - } - } - - Gradient { - id: greenButton - GradientStop { - position: 0 - color: "#80c342" - } - GradientStop { - position: mouseArea.pressed && root.btnEnable ? 0.7 :1 - color: "#5fac18" - } - } -} diff --git a/examples/webenginequick/customdialogs/forms/FilePicker.qml b/examples/webenginequick/customdialogs/forms/FilePicker.qml deleted file mode 100644 index 45ffefb3a..000000000 --- a/examples/webenginequick/customdialogs/forms/FilePicker.qml +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause - -import QtQuick - -FilePickerForm { - property QtObject request - property string selectedFile - signal closeForm() - - cancelButton.onClicked: { - request.dialogReject(); - closeForm(); - } - - okButton.onClicked: { - request.dialogAccept('/' + selectedFile); - closeForm(); - } - - function createCallback(fileIndex) { - return function() { - for (var i = 0; i < files.children.length; i++) { - var file = files.children[i]; - if (i === fileIndex) { - selectedFile = file.text; - file.selected = true; - } else { - file.selected = false; - } - } - } - } - - Component.onCompleted: { - selectedFile = request.defaultFileName; - for (var i = 0; i < files.children.length; i++) { - var file = files.children[i]; - file.clicked.connect(createCallback(i)); - if (file.text === selectedFile) - file.selected = true; - } - } -} diff --git a/examples/webenginequick/customdialogs/forms/FilePickerForm.ui.qml b/examples/webenginequick/customdialogs/forms/FilePickerForm.ui.qml deleted file mode 100644 index 1e99b1a91..000000000 --- a/examples/webenginequick/customdialogs/forms/FilePickerForm.ui.qml +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause - -import QtQuick -import QtQuick.Layouts - -Item { - property alias cancelButton: cancelButton - property alias okButton: okButton - property string message: "Message" - property string title: "Title" - property alias files: files - - ColumnLayout { - id: columnLayout - anchors.topMargin: 20 - anchors.top: parent.top - anchors.bottomMargin: 20 - anchors.bottom: parent.bottom - anchors.rightMargin: 20 - anchors.right: parent.right - anchors.leftMargin: 20 - anchors.left: parent.left - - Image { - id: image - Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter - source: "qrc:/icon.svg" - } - - Rectangle { - id: rectangle - width: parent.width - height: 30 - Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter - gradient: Gradient { - GradientStop { - position: 0 - color: "#25a6e2" - } - - GradientStop { - color: "#188bd0" - } - } - - Text { - id: title - x: 54 - y: 5 - color: "#ffffff" - text: qsTr("Select File") - font.pointSize: 12 - anchors.horizontalCenter: parent.horizontalCenter - anchors.verticalCenter: parent.verticalCenter - } - } - - Item { - width: 40 - height: 40 - } - - ColumnLayout { - id: files - - FileRow { - id: filename1 - text: "example.qdoc" - } - - FileRow { - id: filename2 - text: "factory.cpp" - } - - FileRow { - id: filename3 - text: "index.html" - } - - FileRow { - id: filename4 - text: "main.qml" - } - - FileRow { - id: filename5 - text: "qt-logo.png" - } - - FileRow { - id: filename6 - text: "window.h" - } - } - - Item { - Layout.fillHeight: true - } - - RowLayout { - id: rowLayout - width: 20 - height: 100 - - Item { - Layout.fillWidth: true - } - - CustomButton { - id: cancelButton - width: 90 - height: 30 - btnText: qsTr("Cancel") - btnBlue: false - } - - CustomButton { - id: okButton - width: 90 - height: 30 - btnText: qsTr("OK") - btnBlue: false - } - } - } -} diff --git a/examples/webenginequick/customdialogs/forms/FileRow.qml b/examples/webenginequick/customdialogs/forms/FileRow.qml deleted file mode 100644 index 1a0cfc0a0..000000000 --- a/examples/webenginequick/customdialogs/forms/FileRow.qml +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause - -import QtQuick -import QtQuick.Layouts - -Item { - id: root - height: 30 - property string text: "Filename" - property bool selected: false - signal clicked() - - RowLayout { - id: fileRow - width: 100 - - Item { - id: item5 - width: 10 - height: 10 - } - - Rectangle { - id: rectangle2 - width: 10 - height: 10 - color: selected ? "#80c342" : "#25a6e2" - } - - Text { - id: filename - text: root.text - font.pointSize: 12 - } - } - - MouseArea { - id: mouseArea - width: 200 - height: 30 - onClicked: root.clicked() - } -} diff --git a/examples/webenginequick/customdialogs/forms/JavaScript.qml b/examples/webenginequick/customdialogs/forms/JavaScript.qml deleted file mode 100644 index 132c95697..000000000 --- a/examples/webenginequick/customdialogs/forms/JavaScript.qml +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause - -import QtQuick -import QtWebEngine - -JavaScriptForm { - property QtObject request - signal closeForm() - - cancelButton.onClicked: { - request.dialogReject(); - closeForm(); - } - - okButton.onClicked: { - request.dialogAccept(prompt.text); - closeForm(); - } - - Component.onCompleted: { - switch (request.type) { - case JavaScriptDialogRequest.DialogTypeAlert: - cancelButton.visible = false; - title = qsTr("Alert"); - message = request.message; - prompt.text = ""; - prompt.visible = false; - break; - case JavaScriptDialogRequest.DialogTypeConfirm: - title = qsTr("Confirm"); - message = request.message; - prompt.text = ""; - prompt.visible = false; - break; - case JavaScriptDialogRequest.DialogTypePrompt: - title = qsTr("Prompt"); - message = request.message; - prompt.text = request.defaultText; - prompt.visible = true; - break; - } - } -} diff --git a/examples/webenginequick/customdialogs/forms/JavaScriptForm.ui.qml b/examples/webenginequick/customdialogs/forms/JavaScriptForm.ui.qml deleted file mode 100644 index b535e7ef9..000000000 --- a/examples/webenginequick/customdialogs/forms/JavaScriptForm.ui.qml +++ /dev/null @@ -1,117 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause - -import QtQuick -import QtQuick.Layouts -import QtQuick.Controls - -Item { - id: root - property alias cancelButton: cancelButton - property alias okButton: okButton - property string message: "Message" - property string title: "Title" - property alias prompt: prompt - - ColumnLayout { - id: columnLayout - anchors.topMargin: 20 - anchors.top: parent.top - anchors.bottomMargin: 20 - anchors.bottom: parent.bottom - anchors.rightMargin: 20 - anchors.right: parent.right - anchors.leftMargin: 20 - anchors.left: parent.left - - Image { - id: image - Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter - source: "qrc:/icon.svg" - } - - Rectangle { - id: rectangle - width: parent.width - height: 30 - Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter - gradient: Gradient { - GradientStop { - position: 0 - color: "#25a6e2" - } - - GradientStop { - color: "#188bd0" - } - } - - Text { - id: title - x: 54 - y: 5 - color: "#ffffff" - text: qsTr("Title") - font.pointSize: 12 - anchors.horizontalCenter: parent.horizontalCenter - anchors.verticalCenter: parent.verticalCenter - } - } - - Item { - width: 40 - height: 40 - } - - Text { - id: message - text: root.message - font.pointSize: 12 - } - - TextField { - id: prompt - width: 300 - height: 22 - Layout.fillWidth: true - font.pointSize: 12 - color: "black" - - background: Rectangle { - color: "white" - border.color: "black" - border.width: 1 - } - } - - Item { - Layout.fillHeight: true - } - - RowLayout { - id: rowLayout - width: 100 - height: 100 - - Item { - Layout.fillWidth: true - } - - CustomButton { - id: cancelButton - width: 90 - height: 30 - btnText: qsTr("Cancel") - btnBlue: false - } - - CustomButton { - id: okButton - width: 90 - height: 30 - btnText: qsTr("OK") - btnBlue: false - } - } - } -} diff --git a/examples/webenginequick/customdialogs/forms/Menu.qml b/examples/webenginequick/customdialogs/forms/Menu.qml deleted file mode 100644 index b90802a0c..000000000 --- a/examples/webenginequick/customdialogs/forms/Menu.qml +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause - -import QtQuick - -MenuForm { - property QtObject request - signal closeForm() - - followLink.onClicked: closeForm() - back.onClicked: closeForm() - forward.onClicked: closeForm() - reload.onClicked: closeForm() - copyLinkUrl.onClicked: closeForm() - saveLink.onClicked: closeForm() - close.onClicked: closeForm() - - Component.onCompleted: { - back.btnEnable = false; - forward.btnEnable = false; - } -} diff --git a/examples/webenginequick/customdialogs/forms/MenuForm.ui.qml b/examples/webenginequick/customdialogs/forms/MenuForm.ui.qml deleted file mode 100644 index b4c06bb7d..000000000 --- a/examples/webenginequick/customdialogs/forms/MenuForm.ui.qml +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause - -import QtQuick -import QtQuick.Layouts - -Item { - property alias followLink: followLink - property alias back: back - property alias forward: forward - property alias reload: reload - property alias copyLinkUrl: copyLinkUrl - property alias saveLink: saveLink - property alias close: close - - ColumnLayout { - id: columnLayout - anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: parent.horizontalCenter - - Image { - id: image - width: 100 - height: 100 - Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter - source: "qrc:/icon.svg" - } - - CustomButton { - id: followLink - btnText: qsTr("Follow") - } - - CustomButton { - id: back - btnText: qsTr("Back") - } - - CustomButton { - id: forward - btnText: qsTr("Forward") - } - - CustomButton { - id: reload - btnText: qsTr("Reload") - } - - CustomButton { - id: copyLinkUrl - btnText: qsTr("Copy Link URL") - } - - CustomButton { - id: saveLink - btnText: qsTr("Save Link") - } - - CustomButton { - id: close - btnBlue: false - btnText: qsTr("Close") - } - } -} diff --git a/examples/webenginequick/customdialogs/forms/TouchSelectionMenu.qml b/examples/webenginequick/customdialogs/forms/TouchSelectionMenu.qml deleted file mode 100644 index 1b0c19789..000000000 --- a/examples/webenginequick/customdialogs/forms/TouchSelectionMenu.qml +++ /dev/null @@ -1,14 +0,0 @@ -// Copyright (C) 2021 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause - -import QtQuick - -TouchSelectionMenuForm { - property QtObject request - signal closeForm() - - cut.onClicked: closeForm() - copy.onClicked: closeForm() - paste.onClicked: closeForm() - contextMenu.onClicked: closeForm() -} diff --git a/examples/webenginequick/customdialogs/forms/TouchSelectionMenuForm.ui.qml b/examples/webenginequick/customdialogs/forms/TouchSelectionMenuForm.ui.qml deleted file mode 100644 index bed39566f..000000000 --- a/examples/webenginequick/customdialogs/forms/TouchSelectionMenuForm.ui.qml +++ /dev/null @@ -1,39 +0,0 @@ -// Copyright (C) 2021 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause - -import QtQuick -import QtQuick.Layouts - -Item { - property alias cut: cut - property alias copy: copy - property alias paste: paste - property alias contextMenu: contextMenu - - ColumnLayout { - id: columnLayout - anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: parent.horizontalCenter - - CustomButton { - id: cut - btnText: qsTr("Cut") - } - - CustomButton { - id: copy - btnText: qsTr("Copy") - } - - CustomButton { - id: paste - btnText: qsTr("Paste") - } - - CustomButton { - id: contextMenu - btnText: qsTr("...") - } - - } -} diff --git a/examples/webenginequick/customdialogs/forms/forms.qmlproject b/examples/webenginequick/customdialogs/forms/forms.qmlproject deleted file mode 100644 index b06afaaf1..000000000 --- a/examples/webenginequick/customdialogs/forms/forms.qmlproject +++ /dev/null @@ -1,45 +0,0 @@ -import QmlProject - -Project { - mainFile: "MenuForm.ui.qml" - - /* Include .qml, .js, and image files from current directory and subdirectories */ - QmlFiles { - directory: "." - } - - JavaScriptFiles { - directory: "." - } - - ImageFiles { - directory: "." - } - - Files { - filter: "*.conf" - files: ["qtquickcontrols2.conf"] - } - - Files { - filter: "qmldir" - directory: "." - } - - Files { - filter: "*.ttf;*.otf" - } - - Environment { - QT_QUICK_CONTROLS_CONF: "qtquickcontrols2.conf" - QT_AUTO_SCREEN_SCALE_FACTOR: "1" - } - - qt6Project: true - - /* List of plugin directories passed to QML runtime */ - importPaths: [ ".", "imports" ] - - /* Required for deployment */ - targetDirectory: "/opt/forms" -} |