Important: Please read the Qt Code of Conduct -

QMediaPlayer Widget causes invisible window

  • I want to add a videoplayer inside of a qtabwidget in my .ui form file. When the program is ran (Windows 8) the program window is invisible and the video plays (you can hear it). Also, if I comment out everything after "ui->Information->addTab(videoWidget, "video");" the program's UI loads like normal and the new tab is created "video", however nothing works cause the mediaPlayer code is commented out. This is the code for the media widget:
    QMediaPlayer mediaPlayer;@

    @ ui->setupUi(this);
    QVideoWidget *videoWidget = new QVideoWidget();
    ui->Information->addTab(videoWidget, "video");

    Can someone help? Thanks!

Log in to reply