diff options
Diffstat (limited to 'share/qtcreator/qmldesigner/assetsLibraryQmlSources/ErrorDialog.qml')
-rw-r--r-- | share/qtcreator/qmldesigner/assetsLibraryQmlSources/ErrorDialog.qml | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/share/qtcreator/qmldesigner/assetsLibraryQmlSources/ErrorDialog.qml b/share/qtcreator/qmldesigner/assetsLibraryQmlSources/ErrorDialog.qml new file mode 100644 index 0000000000..58e1910b18 --- /dev/null +++ b/share/qtcreator/qmldesigner/assetsLibraryQmlSources/ErrorDialog.qml @@ -0,0 +1,40 @@ +// Copyright (C) 2022 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 + +import QtQuick +import QtQuick.Controls +import HelperWidgets as HelperWidgets +import StudioTheme as StudioTheme + +Dialog { + id: root + + required property string message + + anchors.centerIn: parent + closePolicy: Popup.CloseOnEscape + implicitWidth: 300 + modal: true + + contentItem: Column { + spacing: 20 + width: parent.width + + Text { + text: root.message + color: StudioTheme.Values.themeTextColor + wrapMode: Text.WordWrap + width: root.width + leftPadding: 10 + rightPadding: 10 + } + + HelperWidgets.Button { + text: qsTr("Close") + anchors.right: parent.right + onClicked: root.reject() + } + } + + onOpened: root.forceActiveFocus() +} |