Results 1 to 5 of 5

Thread: Plugin Loading and Signal Handling in Qt4

  1. #1
    Join Date
    Jan 2008
    Posts
    2
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Plugin Loading and Signal Handling in Qt4

    Hi,
    Anyone can post a tutorial, which describe how we can load plugins and connect signal and slots from main program to plugin in Qt4.

  2. #2
    Join Date
    Aug 2007
    Location
    Gorakhpur, India
    Posts
    254
    Thanks
    8
    Thanked 14 Times in 14 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default Re: Plugin Loading and Signal Handling in Qt4

    Quote Originally Posted by liquid View Post
    Hi,
    Anyone can post a tutorial, which describe how we can load plugins and connect signal and slots from main program to plugin in Qt4.
    I think it may help you.
    http://doc.trolltech.com/4.3/plugins-howto.html http://doc.trolltech.com/4.3/tools-plugandpaint.html
    Anurag Shukla
    A man who never makes mistake is the man who never does anything! Theodre Rosvelt!

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

    liquid (25th January 2008)

  4. #3
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Plugin Loading and Signal Handling in Qt4

    A plugin interface cannot declare signals and slots because it cannot inherit QObject. But you can make the plugin interface return an object which provides those signals and slots.
    J-P Nurmi

  5. The following user says thank you to jpn for this useful post:

    liquid (25th January 2008)

  6. #4
    Join Date
    Jan 2008
    Posts
    2
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Plugin Loading and Signal Handling in Qt4

    Thanks.
    Can you post a simple example code, which describe how to make a plugin interface, which return an object that provides signals and slots.

  7. #5
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Plugin Loading and Signal Handling in Qt4

    Qt Code:
    1. class PluginInterface
    2. {
    3. public:
    4. virtual ~PluginInterface() {}
    5. virtual QObject* someObjectWithSignalsAndSlots() const = 0; // <--
    6. ...
    7. };
    8.  
    9. Q_DECLARE_INTERFACE(...)
    To copy to clipboard, switch view to plain text mode 
    J-P Nurmi

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.