1
votes

Amazingly, i switched a QWidget to be a QGLWidget and now my QPainter::drawImage calls are 5x faster. I changed nothing else, except the widget type. How does that make QPainter calls perform better? I'm glad it works, but i just do not understand how. Any ideas?

Thanks.

3

3 Answers

2
votes

The QGLWidget uses the OpenGL implementation you have available on your system, which may be hardware accelerated. It depends on your system. Qt widgets can be rendered using different QPaintEngine's. You can even try to change the entire graphics system to use OpenGL by trying to run an application with the parameter -graphicssystem. This cannot be done currently in Qt for Linux Embedded. You can try the difference running the animatedtiles example for instance. Note that this doesn't necessarily mean performance will be better than with the raster painter. It depends on the OpenGL implementation of the system, if it is only software, performance may be even worst.

0
votes

It uses OpenGL for rendering its content.

0
votes

If it's using OpenGL, it's probably also using hardware acceleration