[SOLVED]Vlc-Qt problem!
-
QMainWindow has already a layout, don't set a new one. Use a placeholder widget that you'll set as central widget of your QMainWindow.
-
Video::Video(QWidget parent) : QMainWindow(parent), _media(0)
{
QWidgetzoneCentrale = new QWidget;
QVBoxLayout *layout=new QVBoxLayout(this);QPushButton *buttonPlayer=new QPushButton("play",this);
_instance = new VlcInstance(VlcCommon::args(), this);
_player = new VlcMediaPlayer(_instance);
widget=new VlcWidgetVideo(_player,this);_player->setVideoWidget(widget);
widget->setMediaPlayer(_player);layout->addWidget(widget); layout->addWidget(buttonPlayer); zoneCentrale->setLayout(layout);
setCentralWidget(zoneCentrale);
connect(buttonPlayer, SIGNAL(clicked()), this, SLOT(player()));
}
Doesn't work,still same error
ps ; even if I use QWidget in place of QMainWindows , I still get the same error
-
QVBoxLayout *layout=new QVBoxLayout(this);
will set the layout onthis
which is not what you want in this case.QVBoxLayout *layout=new QVBoxLayout(zoneCentrale);
will set the layout on the zoneCentrale -
Still same error :'(, i don't know anymore
-
The layout problem ?
-
When i launch the program , i have this message http://fr.tinypic.com/view.php?pic=dzb138&s=6#.Vhg6sHrtlBc
and error ;
core libvlc error: No plugins found! Check your VLC installation.
[03126584] core libvlc error: No plugins found! Check your VLC installation.
VLC-Qt Error: libvlc failed to load!I test this condition
QLibrary lib( "libvlc" );
if ( lib.load() )
{
qDebug() << "libvlc loaded";
}
else
{
qDebug() << "libvlc not loaded";
}
she return always true -
Try setting
VLC_PLUGIN_PATH
in your application environment variables (Run part of the project panel in Qt Creator) -
it works, I added the folder plu gin in release !!! i"m very happy :')
-
Good :)
Then since you have it working now please update the thread title prepending [solved] so other forum users may know a solution has been found :)
-
Hi everybody, when I launch my program from Qt Creator all is OK.
But when I run exec file directly from windows explorer no HMI appears. I use dependency walker to see what is wring and I have got the same message :
GetProcAddress(0x76190000 [GDI32.DLL], "GetCharWidthI") called from "QWINDOWS.DLL" at address 0x520D4FAA and returned 0x761C8EB6.
GetProcAddress(0x76060000 [MSVCRT.DLL], "_get_output_format") called from "LIBVLCCORE.DLL" at address 0x5042A5E4 and returned 0x760D5CE8.
core libvlc error: No plugins found! Check your VLC installation.
VLC-Qt Error: libvlc failed to load!
Second chance exception 0xC0000005 (Access Violation) occurred in "LIBVLC.DLL" at address 0x5238D481.
Exited "TESTVIDEO.EXE" (process 0xE44) with code -1073741819 (0xC0000005).Have you got an idea? I saw in last topic that I need to add environnement variable VLC_PLUGIN_PATH. Where is the plugin path? Does I need to install VLC. I only install QtVlc with the 3 folders, bin, include et lib.
Regards