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
8#include <QtGui/private/qhighdpiscaling_p.h>
9#include <QtGui/qguiapplication.h>
10
12
13void QOhosPlatformCursor::changeCursor(QCursor *cursor, QWindow *window)
14{
15 if (cursor == nullptr)
16 return;
17
18 auto *platformWindow = QOhosPlatformWindow::fromQWindowOrNull(window);
19 if (platformWindow != nullptr)
20 platformWindow->setCursor(*cursor);
21}
22
23QPoint QOhosPlatformCursor::pos() const
24{
25 return QHighDpi::toNativePixels(QPlatformCursor::pos(), QGuiApplication::primaryScreen());
26}
27
28QT_END_NAMESPACE
Combined button and popup list for selecting options.