diff options
Diffstat (limited to 'examples/quickcontrols/filesystemexplorer/FileSystemModule/qml/WindowDragHandler.qml')
-rw-r--r-- | examples/quickcontrols/filesystemexplorer/FileSystemModule/qml/WindowDragHandler.qml | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/examples/quickcontrols/filesystemexplorer/FileSystemModule/qml/WindowDragHandler.qml b/examples/quickcontrols/filesystemexplorer/FileSystemModule/qml/WindowDragHandler.qml new file mode 100644 index 000000000..0e140aca3 --- /dev/null +++ b/examples/quickcontrols/filesystemexplorer/FileSystemModule/qml/WindowDragHandler.qml @@ -0,0 +1,16 @@ +// Copyright (C) 2023 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Controls + +// Allows dragging the window when placed on an unused section of the UI. +DragHandler { + + required property ApplicationWindow dragWindow + + target: null + onActiveChanged: { + if (active) dragWindow.startSystemMove() + } +} |