奥特QT DDS 插件库
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

26 行
468B

  1. #include "PluginLoader.hpp"
  2. PluginLoader::PluginLoader(QObject *parent)
  3. : QObject(parent)
  4. {
  5. }
  6. QObject* PluginLoader::loadPlugin(const QString& path)
  7. {
  8. if (m_loader.isLoaded()) {
  9. m_loader.unload();
  10. }
  11. m_loader.setFileName(path);
  12. return m_loader.instance();
  13. }
  14. bool PluginLoader::unloadPlugin()
  15. {
  16. return m_loader.unload();
  17. }
  18. QString PluginLoader::errorString() const
  19. {
  20. return m_loader.errorString();
  21. }