1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
import QtQuick
import QtQuick.Controls
import QtQuick.Dialogs
Window {
width: 480
height: 640
property alias dialog: dialog
function getSubWindow1 () {
return subwindow1
}
function getSubWindow2 () {
return subwindow2
}
function goToSubWindow1() {
dialog.close()
dialog.parentWindow = subwindow1
dialog.open()
}
function goToSubWindow2() {
dialog.close()
dialog.parentWindow = subwindow2
dialog.open()
}
function resetParentWindow() {
dialog.close()
dialog.parentWindow = undefined
dialog.open()
}
Window {
id: subwindow1
width: 480
height: 640
visible: true
}
Window {
id: subwindow2
width: 480
height: 640
visible: true
}
ColorDialog {
id: dialog
objectName: "ColorDialog"
}
}
|