I am trying to show the frame rate for my gl widget with renderText. I am getting the following error, and haven't been able to find any posts about the problem.

error:
QGLContext::generateFontDisplayLists: Could not generate display lists for font 'Times'

Note:
I get this error with any font I try to use. I get it when I don't specify a font and I get it when I try to specify different fonts. Here is my code in paintGL()

Qt Code:
  1. void GLPanel::paintGL()
  2. {
  3. .....
  4. .....
  5. // Drawing code emitted
  6.  
  7. double dElapsed = time->elapsed();
  8. time->restart();
  9.  
  10. glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
  11.  
  12. m_dFrameTimes += dElapsed/1000.0;
  13.  
  14. if ( ++m_nFrames == FRAME_RATE_CALC )
  15. {
  16. m_dFrameRate = FRAME_RATE_CALC/m_dFrameTimes;
  17.  
  18. m_nFrames = 0;
  19. m_dFrameTimes = 0.0;
  20. }
  21.  
  22. if ( m_bShowInfo )
  23. {
  24. glPushMatrix();
  25. qglColor(QColor(0,0,0));
  26. glTranslated(0.0,0.0,0.0);
  27. renderText(10.0,10.0,0.0,QString("%1").arg(m_dFrameRate,0,'f',2),QFont("Times",10,QFont::Bold));
  28. glPopMatrix();
  29. }
  30.  
  31. glFlush();
  32. }
To copy to clipboard, switch view to plain text mode