Qt QOpenGLWidget wheelEvent strange behaviour

前端 未结 3 1893
北荒
北荒 2021-01-15 02:26

I have the following class :

class Curve2DOpenGLWidget : public QOpenGLWidget, protected QOpenGLFunctions_3_3_Core {
Q_OBJECT   
public:

    Curve2DOpenGLWi         


        
3条回答
  •  深忆病人
    2021-01-15 02:54

    I did run into the same problem.

    In my case it was a QTimer based render loop which was updating 4 QOpenGLWidgets and the window’s title bar (which was actually pretty CPU intensive) at 100 FPS.
    It didn’t manifest on Windows, but on Linux.

    The update events for the qoglwidgets and the mouse move events probably have higher priority in the event loop than the wheel events. The wheel events don’t seem to be dropped but are accumulated and arrive together with next event that »gets through«.

    Luckily the use case allowed to replace this render loop with an event driven implementation avoiding this issue.

提交回复
热议问题