Qt3DInput::QInputSettings Class

class Qt3DInput::QInputSettings

QInputSettings 类持有指向输入事件源对象的指针。更多

头文件: #include <QInputSettings>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3dinput)
target_link_libraries(mytarget PRIVATE Qt6::3dinput)
qmake: QT += 3dinput
在 QML 中: InputSettings
继承: Qt3DCore::QComponent
状态:已废弃

属性

公共功能

QObject *eventSource() const

公共插槽

void setEventSource(QObject *eventSource)

信号

void eventSourceChanged(QObject *)

详细说明

QInputSettings 组件必须设置为场景根实体的一个组件。它存储了一个指向作为输入事件源的对象的指针,该输入事件源将由各种输入类处理。例如,QWindow 实例可以是一个事件源。

另请参阅 QMouseDeviceQKeyboardDevice

属性文档

eventSource : QObject*

保存当前事件源。事件源是一个能够接收各种输入事件(如鼠标或键盘事件)的对象。通常是QWindow 实例。

访问功能:

QObject *eventSource() const
void setEventSource(QObject *eventSource)

Notifier 信号:

void eventSourceChanged(QObject *)

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.