[Interest] Calculate FPS with QGLWidget - paintGL() is not called
Samuel Rødal
samuel.rodal at nokia.com
Fri Feb 10 09:09:21 CET 2012
On 02/10/2012 08:56 AM, ext Dietrich.Gossen at continental-corporation.com
wrote:
>
> I am trying to calculate the fps of my application. I know in general
> how to do it, but my implemented QGLWidget doesn’t work properly. The
> paintGL() Method doesn’t get called.
>
> That’ how my own Widget GLWidget looks like:
My guess is that paintGL() doesn't get called since you're using the
QGLWidget as a viewport in graphics view. The viewport itself doesn't
get a paint event, it's QGraphicsView::paintEvent() that creates a
QPainter on its viewport().
If you want to measure FPS you could override
QGraphicsView::drawForeground() or similar, as its called once per frame.
--
Samuel
More information about the Interest
mailing list