It should be possible to place an overlay on top of video content using a widget hierarchy as follows:
VideoWidget can either be:
- Derived from Phonon::VideoWidget, in which case the Phonon backend internally creates a child widget can calls winId() on it
- Derived from QWidget, in which case winId() is called by the VideoWidget itself and the native window handle passed to CVideoPlayerUtility2
The position and size of Overlay is updated whenever the position or size of VideoWidget changes - this can be done by installing an eventFilter on VideoWidget.
The z-order of Overlay is higher than that of VideoWidget.
Because winId() is called on either VideoWidget or one of its children, native window handles are created for all widgets in the tree, including Overlay. Video is therefore rendered into a separate native window from that used to display the overlay.
Qt: Built from source, qt-s60-public/4.7 commit 700ba679
Device: N8, wk26 RnD image
This can be reproduced using the attached test app videooverlay_
The attached logs were created in the above environment using the following command line options :
Overlay is visible on top of video content .
- When the application starts up, the UI is rendered correctly (other than the positioning error tracked by
- When video starts playing, it covers the overlay 
 When using the raster paint engine, native video rendering works correctly, but only if a special paint mode is set on VideoWidget:
Setting either paint mode when using OpenVG graphics has no effect.
 The overlay will be displayed transparent, even if Qt::WA_TranslucentBackground is set on it. This is because, to be shown translucent, the overlay must be a TLW, because this is the only way for the overlay to be rendered to a backing store which has an alpha channel. This can be done by running the test app with the following options:
The video and overlay are then rendered correctly (other than the positioning error tracked by
 Whenever '-video native' is specified, the borders above and below the video content are filled with white, rather than the expected black borders.
 This is not a window z-ordering problem: calling raise() on Overlay, at the point when video is displayed, does not have any effect.