[Interest] Calculate FPS with QGLWidget - paintGL() is not called

Dietrich.Gossen at continental-corporation.com Dietrich.Gossen at continental-corporation.com
Fri Feb 10 10:00:52 CET 2012


Hi Samuel,

thanks, that solved my Problem.

Regards,

Dietrich Gossen
Continental Engineering Services





Von:    Samuel Rødal <samuel.rodal at nokia.com>
An:     interest at qt-project.org
Datum:  10.02.2012 09:11
Betreff:        Re: [Interest] Calculate FPS with QGLWidget - paintGL() is 
not     called
Gesendet von:   
interest-bounces+dietrich.gossen=continental-corporation.com at qt-project.org



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
_______________________________________________
Interest mailing list
Interest at qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120210/fdb0bbe1/attachment.html>


More information about the Interest mailing list