奥特QT DDS 插件库
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

26 lignes
463B

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