Warning, /frameworks/kwindowsystem/src/qml/examples/forceActiveWindow.qml is written in an unsupported language. File is not indexed.
0001 /*
0002 SPDX-FileCopyrightText: 2023 Nicolas Fella <nicolas.fella@gmx.de>
0003
0004 SPDX-License-Identifier: LGPL-2.1-or-later
0005 */
0006
0007 import QtQuick 2.15
0008 import QtQuick.Window 2.15
0009 import QtQuick.Controls 2.15 as QQC2
0010
0011 import org.kde.kwindowsystem 1.0
0012
0013 Item {
0014
0015 QQC2.Button {
0016 anchors.centerIn: parent
0017 text: "Force"
0018 // Forcing the current window to be active it a bit silly, but it illustrates how to use the API
0019 onClicked: KX11Extras.forceActiveWindow(Window.window)
0020 }
0021 }