QOpenGLWidget in QTabWidget slows MouseMoveEvent

263 Views Asked by At

For a kind of CAD application I first create a QWidget (intended as a 2D editor) with mouse tracking enabled in a tab of QTabWidget. Drawing and moving lines is super fast as expected.

Next I create a new tab with an QOpenGLWidget (intended as a 3D view). No mouse tracking, but it reacts super fast to mouseMoveEvent() when button pressed. As expected.

Now when I switch the tab back to the QWidget mouseMoveEvents become very slow. WHY? Switching back to GL shows that the QOpenGLWidget still reacts fast.

I inserted QDebug output to paintGL() - it's not called. Next I uncommented all of the code in initializeGL(), resizeGL() and paintGL(), so no GL code at all remains. Still the same problem!

Qt version is 5.5.1 running on Ubuntu 14.04.5 LTS.

0

There are 0 best solutions below