I implemented widget for playing media files like this:
If you want to compile it in your environment, you should copy also this files: mediaslider.h mediaslider.cpp and add multimedia and multimediawidgets on your .pro file
It just uses QMediaPlayer and QVideoWidget like in the examples in Qt documentation.
I create widget like this:
MediaPlayerWidget player;
player.setSource(
"path_to_videofile");
player.show();
Everything works fine, but when I am resizing the window, it appears next text in console:
QWidget::paintEngine: Should no longer be called
What's going on? I didn't call QWidget::paintEngine. Is it Qt bug?
Yes, this is a Qt bug. QWidget::paintEngine is for Qt core internal use only but QMediaPlayer seems to be using it, possibly indirectly via a WA_PaintOnScreen flag being set at some point inside the library.
For what it's worth, you are not the only person to notice this issue, and if the player works the warning can be ignored fairly safely. Future Qt updates will likely resolve this issue over time.