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

This forum is about all development around libVLC.
koghqr
New Cone
New Cone
Posts: 1
Joined: 07 Aug 2018 05:08

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

Postby koghqr » 07 Aug 2018 05:45

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.

pikahenry
New Cone
New Cone
Posts: 1
Joined: 15 Aug 2018 08:46

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

Postby pikahenry » 15 Aug 2018 09:42

Hi koghgr,

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


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 29 guests