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 QtQuick.Controls 2.13
|
||||
import "../imports"
|
||||
import "."
|
||||
|
||||
Popup {
|
||||
property url source: "../app/img/check-circle.svg"
|
||||
|
@ -10,6 +11,7 @@ Popup {
|
|||
property string link: "https://etherscan.io/"
|
||||
|
||||
id: root
|
||||
closePolicy: Popup.NoAutoClose
|
||||
height: 68
|
||||
padding: 0
|
||||
margins: 0
|
||||
|
@ -17,6 +19,16 @@ Popup {
|
|||
x: parent.width - width - Style.current.bigPadding
|
||||
y: parent.height - height - Style.current.bigPadding
|
||||
|
||||
onOpened: {
|
||||
timer.setTimeout(function() {
|
||||
root.close()
|
||||
}, 4000);
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: timer
|
||||
}
|
||||
|
||||
background: Rectangle {
|
||||
id: container
|
||||
radius: Style.current.radius
|
||||
|
|
Loading…
Reference in New Issue