Page MenuHomePhorge

SelfDestroyableOverlaySheet.qml
No OneTemporary

Size
838 B
Referenced Files
None
Subscribers
None

SelfDestroyableOverlaySheet.qml

/*
* This file is part of kazv.
* SPDX-FileCopyrightText: 2024 tusooa <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import QtQuick 2.15
import QtQuick.Layouts 1.15
import QtQuick.Controls 2.15
import org.kde.kirigami 2.13 as Kirigami
Kirigami.OverlaySheet {
id: selfDestroyableOverlaySheet
property var shouldSelfDestroy: false
property var selfDestroyConn: Connections {
target: selfDestroyableOverlaySheet
// for KF5
function onSheetOpenChanged() {
if (!selfDestroyableOverlaySheet.sheetOpen
&& selfDestroyableOverlaySheet.shouldSelfDestroy) {
selfDestroyableOverlaySheet.destroy();
}
}
// for KF6
function onClosed() {
if (selfDestroyableOverlaySheet.shouldSelfDestroy) {
selfDestroyableOverlaySheet.destroy();
}
}
}
}

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 26, 4:04 PM (1 d, 11 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40413
Default Alt Text
SelfDestroyableOverlaySheet.qml (838 B)

Event Timeline