Well I suspect you can't work this issue out by Qt API, i.e. keep your app cross-platform. 
I see the libvlc.dll problem is in that it has dependencies in the same directory(C:\Program Files (x86)\VideoLAN\VLC) which is not a part of default dll search paths.
To make your app looking more cross-platform I would suggest you to call SetDllDirectory WinAPI and then load libvlc by using QLibrary:
#if defined( Q_WS_WIN )
SetDllDirectory( L"C:\\Program Files (x86)\\VideoLAN\\VLC" );
#endif
if ( lib.load() )
{
qDebug() << "libvlc loaded";
}
else
{
qDebug() << "libvlc not loaded";
}
#if defined( Q_WS_WIN )
SetDllDirectory( L"C:\\Program Files (x86)\\VideoLAN\\VLC" );
#endif
QLibrary lib( "libvlc" );
if ( lib.load() )
{
qDebug() << "libvlc loaded";
}
else
{
qDebug() << "libvlc not loaded";
}
To copy to clipboard, switch view to plain text mode
Bookmarks