There are several examples of using QVideoWidget together with QMediaPlayer. The "standard" way of getting the video on the screen is something like this:
{
...
player = new QMediaPlayer(this);
videoWidget = new QVideoWidget;
videoWidget->setMediaObject(player);
QBoxLayout *layout = new QVBoxLayout;
layout->addWidget(videoWidget);
...
}
So far so good and most (all?) of the examples I've seen end up here: video is playing nicely on the screen and after that it is sufficient to exit the application.
But what if you want to do something else after the video comes to its end? How do you remove it from the screen?
I have tried several strategies for this but nothing seems to work.
What is the proper way of clearing the screen from the video (after the video) and putting something else on view instead?



