. , Qt (-, Qt , Qt. script .pro Qt Creator. , , QPluginLoader::errrorString(), QPluginLoader::load() false.
:
QPluginLoader pluginLoader(m_packagePath);
bool bLoaded = pluginLoader.load();
if (bLoaded)
{
QObject* plugin = pluginLoader.instance();
m_metaObject = plugin->metaObject();
if (m_metaObject == nullptr)
{
qCritical() << "Unable to obtain entry class of input plugin. Please check your plugin.";
return false;
}
}
else
{
qCritical() << "Message from Qt plugin loader:";
qCritical() << pluginLoader.errorString();
qCritical() << "Please make sure your input Qt plugin along with its dependencies are deployed with winqtdeploy.exe and in the same folder as your plugin.";
exit(-1);
}
script Stackoverflow, :
Qt Creator