Amazingly, i switched a QWidget to be a QGLWidget and now my QPai开发者_Go百科nter::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.
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.
It uses OpenGL for rendering its content.
If it's using OpenGL, it's probably also using hardware acceleration
精彩评论