change toast to window

This commit is contained in:
王劲鹏
2021-04-21 16:10:35 +08:00
committed by osborn
parent c087f06647
commit 7bcb711dfe
2 changed files with 51 additions and 41 deletions

View File

@@ -2,10 +2,13 @@ import QtQuick 2.12
import QtQuick.Controls 2.5
import QtQuick.Layouts 1.15
Rectangle {
width: childrenRect.width
height: childrenRect.height
Window {
id: window
flags: flags | Qt.WindowStaysOnTopHint | Qt.Tool | Qt.FramelessWindowHint | Qt.WindowTransparentForInput
color: "#bb000000"
visible: true
ColumnLayout {
Text {
@@ -17,6 +20,14 @@ Rectangle {
Layout.topMargin: 15
Layout.bottomMargin: 15
}
onWidthChanged: {
window.width = implicitWidth
}
onHeightChanged: {
window.height = implicitHeight
}
}
}