Unable to set video in the background in Qt 6.6.2
-
I have implemented a small program where I am using the QVideoWidget to set the video and QMediaPlayer to play the background as shown below
player = new QMediaPlayer(this);
vw = new QVideoWidget(this);
player->setVideoOutput(vw);ui->gridLayout->addWidget(vw, 0, 0, -1, -1); vw->lower(); vw->update(); player->setMedia(QUrl::fromLocalFile("C:\\Users\\shubh\\Downloads\\FUI.mp4")); player->play();
This code works fine in qt 5.12.7 but on latest version its not working we can see only video no buttons or any ui component on it. I tried by using the buttons which are invisible but we can get the click event.
Can you tell me why its not working on 6.6.2 whereas it should be?
-
I'm so sorry!
I read your question way too carelessly! -
@Shubham08 said in Unable to set video in the background in Qt 6.6.2:
but on latest version its not working we can see only video no buttons or any ui component on it.
You do not show how you're putting other widgets on top of QVideoWidget