Unsolved How to customize/create a Wheel Event?
-
Hi guys!
I was trying to create a wheel event for my widget in PyQt5. I did it in Qt(C++), but so far I have no idea in PyQt.
Please help me. Thanks in advance! -
@SoleyRan
Did you try translating your C++ code to PyQt5? -
@JonB Yes, I tried to translate the C++ code to PyQt5, but it seems the params of QWheelEvent in PyQt5 is not the exactly same as Qt. ( I am not sure...)
I got these info:
Qt(C++): QWheelEvent::QWheelEvent(QPointF pos, QPointF globalPos, QPoint pixelDelta, QPoint angleDelta, Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers, Qt::ScrollPhase phase, bool inverted, Qt::MouseEventSource source = Qt::MouseEventNotSynthesized)
PyQt5: class QWheelEvent(pos, globalPos, pixelDelta, angleDelta, buttons, modifiers, phase, inverted[, source=Qt.MouseEventNotSynthesized]) -
@SoleyRan
Trying to read through those two lines not presented in code tags here, seems to me they are the same.