2022-05-13 13:12:05 +00:00
|
|
|
// Copyright (C) 2017 The Qt Company Ltd.
|
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
//![0]
|
2022-08-31 07:59:05 +00:00
|
|
|
import QtQuick
|
2011-04-27 10:05:43 +00:00
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
id: container
|
|
|
|
|
|
|
|
function show(text) {
|
|
|
|
dialogText.text = text;
|
|
|
|
container.opacity = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
function hide() {
|
|
|
|
container.opacity = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
width: dialogText.width + 20
|
|
|
|
height: dialogText.height + 20
|
|
|
|
opacity: 0
|
|
|
|
|
|
|
|
Text {
|
|
|
|
id: dialogText
|
|
|
|
anchors.centerIn: parent
|
|
|
|
text: ""
|
|
|
|
}
|
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
anchors.fill: parent
|
|
|
|
onClicked: hide();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//![0]
|