1

There are a few questions about displaying video more efficiently in Qt than by showing it as QLabel. There seem to be two approaches:

Since my current approach involves a QPixmapItem created from a QImage populated with my image data, even at small resulutions (<1 MP, 30 Hz) my Core2Duo is reporting 40 % load.

I would like to keep using QGraphicsScene in order to show multiple images/videos, but I don't know whether it's possible to show (multiple) QGLWidgets in a scene - is it?

Community
  • 1
  • 1
none
  • 181
  • 1
  • 5
  • The Qt documentation for [QGraphicsScene](http://qt-project.org/doc/qt-4.8/qgraphicsscene.html#addWidget) states that adding a QGLWidget is not supported. – none Sep 28 '12 at 11:51

1 Answers1

0

Perhaps not several GLWidget, but several GraphicsItem, calling painter->beginNativePaintingwhich allows openGL commands to be issued.

The viewport of the graphicView must be a QGLwidget, the latter initialized with QGLFormat(QGL::SampleBuffers) in the constructor. see Qt widgets using opengl

The case is simpler when OpenGL active item is in the background, because calls to glClear erase the viewport background as well, clearing any item below with a lower zorder.

Flint
  • 1,651
  • 1
  • 19
  • 29