Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

Use QML VideoOutput item with C++ QMediaPlayer?

$
0
0
Hi, is it possible to render video from the C++ class QMediaPlayer in Quick2’s VideoOutput item? I need to use real c++ features like the QVideoProbe, but still display via the Quick2 engine. I have tried to expose the QMediaPlayer object to QML like so, QMediaPlayer player; QQuickView view; view.engine()->rootContext()->setContextProperty("mediaplayer", &player); and then use it in QML like this:     VideoOutput {         id: videooutput         width: 320         height: 240         source: mediaplayer    } But that does not seem to work, no video and no error message. Same code works with the QML MediaPlayer as source though. Thanks!

Viewing all articles
Browse latest Browse all 4972

Trending Articles