Results 1 to 3 of 3

Thread: QWidget-derived Application Plugins

Hybrid View

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

    Default Re: QWidget-derived Application Plugins

    Instead of making the plugin itself a QWidget, make it allocate and return a QWidget when requested, more or less like this:
    Qt Code:
    1. class MyPluginInterface
    2. {
    3. ...
    4. QWidget* createWidget(QWidget* parent) = 0;
    5. ...
    6. };
    To copy to clipboard, switch view to plain text mode 
    J-P Nurmi

  2. #2

    Default Re: QWidget-derived Application Plugins

    With some retooling, it worked!

    Thank you.

    I'd discovered a similar (though more convoluted) way just before reading your post, but your suggestion is, IMO, better than mine...

    Follow-on question:

    These modules are an aggregation of widgets and code, connected through module-private signals and slots. Now that the UI is drawn on a parent object, how I do re-connect these private signals and slots so that the interface is processed properly? I might have thought they would be reconnected as they're part of the same block of code, but they don't seem to be.. Thoughts?

    Thanks!

    SnarlCat

Similar Threads

  1. Replies: 0
    Last Post: 18th February 2008, 10:53
  2. Setting window icon on derived QWidget
    By steg90 in forum Qt Programming
    Replies: 5
    Last Post: 16th July 2007, 11:21
  3. Replies: 1
    Last Post: 2nd May 2006, 21:11
  4. Plugins as small application
    By blackliteon in forum Qt Programming
    Replies: 4
    Last Post: 12th January 2006, 09:39

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
  •  
Qt is a trademark of The Qt Company.