Results 1 to 2 of 2

Thread: QPluginLoader question

  1. #1
    Join Date
    Jul 2007
    Posts
    121
    Thanks
    38
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default QPluginLoader question

    Question1: When QPluginloader member function instance() returns pointer to the interface of the plugin - should this pointer be deleted when I call unload()?

    Question2: In general, when I stuff the pointers to the root interface of plugins in the container such as QList, and then I would like to reload plugins - what should be done with these pointers?

    Question3: QPluginLoader class has a pointer to a private class that I can't find the implementation of. It is supposed to be platform-specfiic and therefore the implementation is hidden in the static libs of QT, isn't it?

  2. #2
    Join Date
    Jan 2006
    Location
    travelling
    Posts
    1,116
    Thanks
    8
    Thanked 127 Times in 121 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QPluginLoader question

    1. You need not bother with deleting this pointer AFAIK. Especially if you call unload() by hand... This pointer is not allocated on heap but points to a static variable stored in the plugin so deleting it is likely to do harm
    2. Clearer explanation of the design involved would be necessary to answer this one...
    3. The implementation is in the sources but as with every other pimpl in Qt the headers of this class are not installed... Besides, they can frequently change from version to version (even patch) since they do not break the binary compat so trying to use them would be foolhardy...
    Current Qt projects : QCodeEdit, RotiDeCode

  3. The following user says thank you to fullmetalcoder for this useful post:

    QPlace (29th July 2007)

Similar Threads

  1. Access to QSqlTableModel::isDirty Question.
    By patrik08 in forum Qt Programming
    Replies: 3
    Last Post: 12th April 2007, 17:49
  2. Replies: 1
    Last Post: 15th March 2007, 20:45
  3. Question regarding how to paint after zoom.
    By JonathanForQT4 in forum Qt Programming
    Replies: 2
    Last Post: 26th January 2007, 15:34
  4. QPluginLoader Qt 4
    By rianquinn in forum Qt Programming
    Replies: 9
    Last Post: 2nd October 2006, 07:04

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.