Qt3DInput::QWheelEvent Class
class Qt3DInput::QWheelEventQWheelEvent 类包含描述鼠标滚轮事件的参数。更多
Header: | #include <Qt3DInput/QWheelEvent> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS 3dinput) target_link_libraries(mytarget PRIVATE Qt6::3dinput) |
qmake: | QT += 3dinput |
在 QML 中: | WheelEvent |
继承: | QObject |
状态: | 已废弃 |
公共类型
enum | Buttons { LeftButton, RightButton, MiddleButton, BackButton, NoButton } |
enum | Modifiers { NoModifier, ShiftModifier, ControlModifier, AltModifier, MetaModifier, KeypadModifier } |
属性
|
公共职能
QWheelEvent(const QWheelEvent &e) | |
QPoint | angleDelta() const |
int | buttons() const |
bool | isAccepted() const |
Qt3DInput::QWheelEvent::Modifiers | modifiers() const |
void | setAccepted(bool accepted) |
QEvent::Type | type() const |
int | x() const |
int | y() const |
相关非成员
另请参阅 QKeyEvent,QMouseEvent, 和QMouseHandler 。
成员类型文档
enum QWheelEvent::Buttons
常数 | 数值 |
---|---|
Qt3DInput::QWheelEvent::LeftButton | Qt::LeftButton |
Qt3DInput::QWheelEvent::RightButton | Qt::RightButton |
Qt3DInput::QWheelEvent::MiddleButton | Qt::MiddleButton |
Qt3DInput::QWheelEvent::BackButton | Qt::BackButton |
Qt3DInput::QWheelEvent::NoButton | Qt::NoButton |
enum QWheelEvent::Modifiers
常数 | 值 |
---|---|
Qt3DInput::QWheelEvent::NoModifier | Qt::NoModifier |
Qt3DInput::QWheelEvent::ShiftModifier | Qt::ShiftModifier |
Qt3DInput::QWheelEvent::ControlModifier | Qt::ControlModifier |
Qt3DInput::QWheelEvent::AltModifier | Qt::AltModifier |
Qt3DInput::QWheelEvent::MetaModifier | Qt::MetaModifier |
Qt3DInput::QWheelEvent::KeypadModifier | Qt::KeypadModifier |
属性文件
accepted : bool
指定是否已接受鼠标滚轮事件
访问功能
bool | isAccepted() const |
void | setAccepted(bool accepted) |
[read-only]
angleDelta : const QPoint
指定鼠标滚轮事件的滚轮角度变化
访问功能
QPoint | angleDelta() const |
[read-only]
buttons : const int
如果鼠标滚轮事件中存在按钮,则指定该按钮
访问功能:
int | buttons() const |
[read-only]
modifiers : const Qt3DInput::QWheelEvent::Modifiers
指定是否对鼠标滚轮事件应用了任何修改器
访问功能
Qt3DInput::QWheelEvent::Modifiers | modifiers() const |
[read-only]
x : const int
指定鼠标滚轮事件的 X 坐标
访问功能
int | x() const |
[read-only]
y : const int
指定鼠标滚轮事件的 Y 坐标
访问函数:
int | y() const |
成员函数文档
[explicit]
QWheelEvent::QWheelEvent(const QWheelEvent &e)
从 QWheelEvente 中构造一个新的 QWheelEvent 实例。
QPoint QWheelEvent::angleDelta() const
返回滚轮旋转的距离,单位为八分之一度。正值表示滚轮向前旋转(远离用户),负值表示滚轮向后旋转(朝向用户)。
注: 属性 angleDelta 的获取函数。
int QWheelEvent::buttons() const
返回一个位字段,用于检查滚轮事件可能伴随的鼠标按钮。
注: 属性按钮的获取函数。
bool QWheelEvent::isAccepted() const
返回事件是否被接受。
注: 属性accepted 的获取函数。
Qt3DInput::QWheelEvent::Modifiers QWheelEvent::modifiers() const
返回滚轮事件可能伴随的键盘修改器。
注: 属性修改器的获取函数。
void QWheelEvent::setAccepted(bool accepted)
如果accepted 为 true,则将事件设置为已接受。
注: 当事件被接受时,它将阻止向其他监听器进一步传播。
注: 属性accepted 的设置函数。
另请参阅 isAccepted().
QEvent::Type QWheelEvent::type() const
返回事件的QEvent::Type 。
int QWheelEvent::x() const
返回鼠标事件的 x 位置。
注: 属性 x 的获取函数。
int QWheelEvent::y() const
返回鼠标事件的 x 位置。
注: 属性 y 的获取函数。
© 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.