feat: make ToastButton close only with button and after 4 seconds
This commit is contained in:
parent
e184408749
commit
f1e1462529
|
@ -2,6 +2,7 @@ import QtQuick 2.13
|
||||||
import QtGraphicalEffects 1.13
|
import QtGraphicalEffects 1.13
|
||||||
import QtQuick.Controls 2.13
|
import QtQuick.Controls 2.13
|
||||||
import "../imports"
|
import "../imports"
|
||||||
|
import "."
|
||||||
|
|
||||||
Popup {
|
Popup {
|
||||||
property url source: "../app/img/check-circle.svg"
|
property url source: "../app/img/check-circle.svg"
|
||||||
|
@ -10,6 +11,7 @@ Popup {
|
||||||
property string link: "https://etherscan.io/"
|
property string link: "https://etherscan.io/"
|
||||||
|
|
||||||
id: root
|
id: root
|
||||||
|
closePolicy: Popup.NoAutoClose
|
||||||
height: 68
|
height: 68
|
||||||
padding: 0
|
padding: 0
|
||||||
margins: 0
|
margins: 0
|
||||||
|
@ -17,6 +19,16 @@ Popup {
|
||||||
x: parent.width - width - Style.current.bigPadding
|
x: parent.width - width - Style.current.bigPadding
|
||||||
y: parent.height - height - Style.current.bigPadding
|
y: parent.height - height - Style.current.bigPadding
|
||||||
|
|
||||||
|
onOpened: {
|
||||||
|
timer.setTimeout(function() {
|
||||||
|
root.close()
|
||||||
|
}, 4000);
|
||||||
|
}
|
||||||
|
|
||||||
|
Timer {
|
||||||
|
id: timer
|
||||||
|
}
|
||||||
|
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
id: container
|
id: container
|
||||||
radius: Style.current.radius
|
radius: Style.current.radius
|
||||||
|
|
Loading…
Reference in New Issue