Page 1 of 1

VLC-Qt shows black screen when VlcWidgetVideo is a child widget

Posted: 07 Aug 2018 05:45
by koghqr
Hello, I got a problem with VLC-Qt. This is my code writed in a constructor of a QMainWindow:

Code: Select all

VlcInstance* pInstance = new VlcInstance(VlcCommon::args(), this); VlcMediaPlayer* pPlayer = new VlcMediaPlayer(pInstance); VlcMedia* pMedia = new VlcMedia("E:/1.rm", true, pInstance); VlcWidgetVideo* pWidget = new VlcWidgetVideo; pPlayer->setVideoWidget(pWidget); pWidget->setMediaPlayer(pPlayer); pWidget->resize(320, 320); pWidget->show(); pPlayer->open(pMedia);
With the code above, I can play the video. But if I change the "new VlcWidgetVideo" in line 4 to "new VlcWidgetVideo(this)", make the VlcWidgetVideo a child of the QMainWindow, then it shows only a black rectangle. I can still hear the sound though. How could I fix this? Any help would be greatly appreciated.

Re: VLC-Qt shows black screen when VlcWidgetVideo is a child widget

Posted: 15 Aug 2018 09:42
by pikahenry
Hi koghgr,

I'm having the same issue with vlc-qt. Did u find any solution to fix it?