KWindowSystem

forceActiveWindow.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 QQC2.Button {
16 anchors.centerIn: parent
17 text: "Force"
18 // Forcing the current window to be active it a bit silly, but it illustrates how to use the API
19 onClicked: KX11Extras.forceActiveWindow(Window.window)
20 }
21}
A collection of functions to obtain information from and manipulate X11 windows.
Definition kx11extras.h:29
static void forceActiveWindow(WId win, long time=0)
Sets window win to be the active window.
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.