用qt显示视频.qt video

QPainter has a method called drawImage. You can do something like the 

following in a subclass of QWidget:


void VideoWidget::paintEvent()
{
//Get the current frame and size data...

//Passing QImage
QImage frame(frameDataUCharPtr, frameWidth, frameHeight.
QImage::Format_RBG32 );

QPainter painter(this);
painter.drawImage(rect(), frame);

}

Under Qtopia you can use QDirectPainter to write directly to framebuffer
memory and get some faster access for drawing frames. You will have to
do the color conversions yourself to get the frame into your
framebuffer's color model.

--Justin

你可能感兴趣的:(QT相关)