Results 1 to 2 of 2

Thread: QPluginLoader instance

  1. #1

    Default QPluginLoader instance

    Hello,

    I am new to Qt, and I am trying to write a plugin for one application following the Plug and Paint example with VC2005 and Qt 4.2. Everything works fine first, but when I want to link the plugin with a external libary(complied by VC2003, I have the includes files, *.lib and *.dll), the plugin becomes 0 after loader.instance() in the source code below, any helps or hints on this issue? I can not compile and control the external libary.

    foreach (QString fileName, pluginsDir.entryList(QDir::Files)) {
    QPluginLoader loader(pluginsDir.absoluteFilePath(fileName));
    QObject *plugin = loader.instance();

  2. #2
    Join Date
    Jan 2006
    Location
    Alingsås, Sweden
    Posts
    437
    Thanks
    3
    Thanked 39 Times in 39 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QPluginLoader instance

    See here:

    http://doc.trolltech.com/4.3/plugins...ns-dynamically

    As the plugin has been built using a different compiler than Qt, it will not be loaded.

Similar Threads

  1. QApplication instance
    By nile.one in forum Qt Programming
    Replies: 9
    Last Post: 5th October 2007, 12:06
  2. QPluginLoader question
    By QPlace in forum Qt Programming
    Replies: 1
    Last Post: 29th July 2007, 11:16
  3. QPluginLoader not recognizing a plugin
    By KShots in forum Qt Programming
    Replies: 3
    Last Post: 29th June 2007, 14:13
  4. QPluginLoader Qt 4
    By rianquinn in forum Qt Programming
    Replies: 9
    Last Post: 2nd October 2006, 07:04
  5. creating a global instance
    By skatakam in forum General Programming
    Replies: 6
    Last Post: 24th February 2006, 16:26

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.