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显示视频.qt video
最新推荐文章于 2024-08-02 17:43:55 发布