0

is there any flag to find out the QT has finished rendering on the screen.

I want this flag to notify the another window to be displayed.

Louis Langholtz
  • 2,913
  • 3
  • 17
  • 40
VamsiKrishna Neelam
  • 103
  • 1
  • 1
  • 11

1 Answers1

0

Not a flag but QPaintEngine's isActive function returns if it's actively drawing. An instance of a class derived from QPaintDevice(e.g. QWidget) can get the engine from paintEngine()

sithereal
  • 1,656
  • 9
  • 16
  • Is there any method to improve the rendering speed, the rendering time is around 51 milli secs around 20 frames per second. – VamsiKrishna Neelam May 15 '17 at 13:42
  • @VamsiKrishnaNeelam Take a look at http://blog.qt.io/blog/2009/12/16/qt-graphics-and-performance-an-overview/ – sithereal May 15 '17 at 14:02
  • Of course there are ways to improve performance. You'd need to show the ill-performing code first. – Kuba hasn't forgotten Monica May 15 '17 at 14:14
  • `void WindowSwitch::switchWindow() { QElapsedTimer renderTime; if (window1->isVisible()) { window1->hide(); renderTime.start(); window2->showFullScreen(); printf("Vamsi:: Window2-Rendering times %lld nano secs, Frame count = %lld\n ",renderTime.nsecsElapsed(),++frameCount); } else { renderTime.restart(); window1->showFullScreen(); printf("Vamsi:: Window1-Rendering times %lld nano secs, Frame count = %lld\n ",renderTime.nsecsElapsed(),++frameCount); window2->hide(); } }` @Ober – VamsiKrishna Neelam May 16 '17 at 09:39