KWindowSystem

showingDesktop.qml
1/*
2 SPDX-FileCopyrightText: 2023 Nicolas Fella <nicolas.fella@gmx.de>
3
4 SPDX-License-Identifier: LGPL-2.1-or-later
5*/
6
7import QtQuick 2.15
8import QtQuick.Window 2.15
9import QtQuick.Controls 2.15 as QQC2
10
11import org.kde.kwindowsystem 1.0
12
13Item {
14
15 Connections {
16 target: KWindowSystem
17
18 function onShowingDesktopChanged() {
19 console.log("Showing desktop changed to " + KWindowSystem.showingDesktop)
20 }
21 }
22
23 Column {
24 anchors.centerIn: parent
25
26 QQC2.Label {
27 text: "Showing desktop: " + KWindowSystem.showingDesktop
28 }
29
30 QQC2.Button {
31 text: "Show"
32 onClicked: KWindowSystem.showingDesktop = true
33 }
34 }
35}
Convenience access to certain properties and features of window systems.
bool showingDesktop
Whether "show desktop" is currently active.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 3 2024 11:45:49 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.