Sunday 15 July 2012

c++ - Show video from device driver in QWidget with native window handle (HWND) on QGraphicsScene -


This is related to my previous question

I have a video frame in QGraphicsScene / View via QPixMapItem I am converting and showing, not with OpenGL. The conversion is generating a processor load which can save the driver from pressing the driver directly from the window, now any scaling issue has been dropped.

While I have a standalone cuegade - & gt; Adding this widget to winID () (see also, HWND,) does not result in video (it is not visible) To be able to use multiple inheritance from a QPixMapItem ("It takes ownership of the view item.") Either did not help.

Does this scene lose its WId when it becomes the child of the scene? Unfortunately, something else should be closed, even while loading a QIs in the item constructor, nothing is shown. I have to investigate further. Editing 1: Class inherited from QWidget and QGraphics, pixmapItem is capable of displaying a pixmap, such as the myWidget-> setPixmap (QImage ("QImage" Test.png "))); My previous image loader was just broken.

Graphics showing the widget at the top of the graphics view, is going to be difficult because scaling and off-scene situations have to be implemented, but I doubt that this mess - free (and I think it's quite Work).

displayed in QWidget QGraphicsScene is very difficult . See details for more information In fact, the widget that you see in QGraphicsView is not the real widget. Returns the paint event in the QGraphicsView just underlying invisible QWidget . Apparently, QT does not know anything about your video redirection, so it can not translate it into the scene.

I think you should not put your widget inside view. For example, consider placing it above the graphics view.

No comments:

Post a Comment