Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qohosplatformcursor.cpp
Go to the documentation of this file.
1
2// Copyright (C) 2025 The Qt Company Ltd.
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
9#include <QtGui/private/qhighdpiscaling_p.h>
10#include <QtGui/qguiapplication.h>
11
13
14void QOhosPlatformCursor::changeCursor(QCursor *cursor, QWindow *window)
15{
16 if (cursor == nullptr)
17 return;
18
19 auto *platformWindow = QOhosPlatformWindow::fromQWindowOrNull(window);
20 if (platformWindow != nullptr)
21 platformWindow->setCursor(*cursor);
22}
23
24QPoint QOhosPlatformCursor::pos() const
25{
26 auto *platformIntegration = QOhosPlatformIntegration::instance();
27 auto *inputMethodEventHandler = platformIntegration->inputMethodEventHandler();
28 return inputMethodEventHandler->cursorPosition();
29}
30
31QT_END_NAMESPACE
static QOhosPlatformIntegration * instance()
QOhosInputMethodEventHandler * inputMethodEventHandler() const
Combined button and popup list for selecting options.