python - Cannot get pixelDelta from QWheelEvent in Qt5 -


i upgraded qt4 qt5 (pyqt, specific) , qwheelevent broke me - returns empty pixeldelta(), phase @ 2 (default). on win 7, warning phases shouldn't apply me. when run code:

from pyqt5 import qtwidgets   class q(qtwidgets.qlabel):      def wheelevent(self, event):         print(event.pixeldelta())  app = qtwidgets.qapplication([]) w = q() w.show() app.exec_() 

scrolling prints 'pyqt5.qtcore.qpoint()' without coordinates. can do?

from qt5 docs qwheelevent:

there 2 ways read wheel event delta: angledelta() returns delta in wheel degrees. value provided. pixeldelta() returns delta in screen pixels , available on platforms have high-resolution trackpads, such os x.

there no pixeldata in qt4. has delta, , equivalent qt5 method angledelta.


Comments

Popular posts from this blog

java - SSE Emitter : Manage timeouts and complete() -

jquery - uncaught exception: DataTables Editor - remote hosting of code not allowed -

java - How to resolve error - package com.squareup.okhttp3 doesn't exist? -