2022-05-13 13:12:05 +00:00
|
|
|
// Copyright (C) 2017 The Qt Company Ltd.
|
2024-02-22 14:51:16 +00:00
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
|
2017-09-25 09:38:08 +00:00
|
|
|
|
2020-03-26 16:01:51 +00:00
|
|
|
import QtQuick
|
|
|
|
import QtQuick.Controls
|
|
|
|
import QtQuick.Layouts
|
2017-09-25 09:38:08 +00:00
|
|
|
|
|
|
|
// TODO
|
|
|
|
QtObject {
|
|
|
|
property string customControlName: qsTr("Dialog")
|
|
|
|
|
|
|
|
property var supportedStates: [
|
2017-09-26 07:05:16 +00:00
|
|
|
[],
|
|
|
|
["modal"],
|
|
|
|
["dim"]
|
2017-09-25 09:38:08 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
property Component component: Button {
|
|
|
|
id: dialogButton
|
|
|
|
text: qsTr("Dialog")
|
|
|
|
hoverEnabled: true
|
|
|
|
|
|
|
|
onClicked: dialog.open()
|
|
|
|
|
|
|
|
Dialog {
|
|
|
|
id: dialog
|
|
|
|
x: (window.width - width) / 2
|
|
|
|
y: (window.height - height) / 2
|
|
|
|
standardButtons: Dialog.Ok | Dialog.Cancel
|
|
|
|
parent: window.contentItem
|
2017-09-26 07:05:16 +00:00
|
|
|
modal: is("modal")
|
2017-10-05 14:56:24 +00:00
|
|
|
dim: is("dim") || is("modal")
|
2017-09-25 09:38:08 +00:00
|
|
|
|
|
|
|
Label {
|
|
|
|
text: "Lorem ipsum dolor sit amet, \nconsectetuer adipiscing elit, \n"
|
|
|
|
+ "sed diam nonummy nibh euismod tincidunt ut \nlaoreet dolore magna aliquam erat volutpat."
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|