Again::How Show a Subtitle on QMediaPlayer?

Hello everybody.
i developing an app and i need to lay video with subtitle
the mediaplayer section is completed, but i dont know how show subtitle or *any text *on it!
so, how can i do it?

Update1::
i used QGraphicVideoItem and it works for showing subtitle with QGraphicTextItem ,
but it has 2 major problem:1.against VideoWidget, the size is fixed.
i mean with VideoWidget, every video has a size but in QGraphicVideoItem its fixed
and not changed with changing window size.2.against VideoWidget it can not play all the videos.

Hi, I am an expert now on this subject, I have developed the same thing and I used the video surface for drawing subtitles.
So I create an algorithm that parse the srt file and draw subtitles on videsurface.(resize is automatic)
You can exploit the custom video surface example and draw on that paint method.Furthermore I have created an object inside the QVideoWidget so, you can set in player->setOutputVideo(videoWidget->videoSurface()).
For video support you can switch the engine to directx.

[quote author="alexRM" date="1414754749"]Hi, I am an expert now on this subject, I have developed the same thing and I used the video surface for drawing subtitles.
So I create an algorithm that parse the srt file and draw subtitles on videsurface.(resize is automatic)
You can exploit the custom video surface example and draw on that paint method.Furthermore I have created an object inside the QVideoWidget so, you can set in player->setOutputVideo(videoWidget->videoSurface()).
For video support you can switch the engine to directx.
[/quote]
What?! :D
i didn't understand at all!
im a newbie in this thing, please say it for amateurs :D
thanks a lot

What videos can not be played?[/quote]
1.using setsize just set the size for once and not changed like VideoWidgetif i get it wrong, please tell me, thanks
2.i really dont know!
it not depends on size or bitrate or pixel
so, i dont know why can not open some of them!

bq. Qt Multimedia features for Windows are implemented in two plugins; one using the Microsoft DirectShow API, and another using WMF (Windows Media Foundation) framework. DirectShow API was introduced in Windows 98, and gradually deprecated from Windows XP onwards. Media Foundation framework was introduced in Windows Vista as a replacement for DirectShow and other multimedia APIs. Consequently, WMF plugin in Qt is supported only for Windows Vista and later versions of the operating system. - "Qt Multimedia on Windows":http://qt-project.org/doc/qt-5/qtmultimedia-windows.html

Per default MSVC compiler compiles using WMF (Windows Media Foundation) and unfortunately it's really limited when talking about formats. You can see the list "here":http://bit.ly/1E8x9N1

If you notice you can't execute mkv, flv, rmvb and others common formats. There's others alternatives that you can try such as MPlayer, QtAV, VLC-Qt.

Searching for how to run other formats you can see this information on Microsoft's FAQ:

bq. Windows Media Player includes some of the most popular codecs, like MP3, Windows Media Audio, and Windows Media Video, but it doesn't include the codecs required for Blu‑ray Discs, FLAC files, or FLV files. If something isn’t working with Windows Media Player, you might not have the right codec on your PC. The easiest way to solve the problem is to go online and search for the codec you need.

bq. Warning
You should only install codecs, filters, or plug-ins from trusted, authorized sources, such as the official website of the codec manufacturer. Be careful when you install codecs that you've found on the Internet, particularly the free codec packs that claim to include codecs from many companies, because these codec packs might include software that can damage your PC. If you've installed any codec packs and are having problems with the Player, we recommend that you remove them.

Resuming: Windows 7 or later supports most modern video and audio codecs and container formats. However it doesn’t support Matroska video files as it doesn’t have native mkv splitter.

For unknown reasons even if you install codecs Qt Multimidia still not running those formats.