Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Qt and vsync/tearing

Tags:

c++

qt

Does anyone know of an easy way to enforce vsync in Qt, when displaying an image onto a QLabel? Basically, I'm rendering a stream of images from a processed video clip (hence not using Phonon multimedia), and the framerate is very high. Unfortunately, this is giving a lot of tearing.

Any help much appreciated.

like image 471
Kristian D'Amato Avatar asked Nov 04 '22 20:11

Kristian D'Amato


1 Answers

Try using QtOpenGL. You can implement your widget over QGLWidget. It will render using opengl, that will sinc to vblank if you set this option in your os.

like image 84
Alessandro Pezzato Avatar answered Nov 12 '22 17:11

Alessandro Pezzato