Results 1 to 3 of 3

Thread: Dynamically Loading UI With Unspecified Slots

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Frankfurt
    Posts
    500
    Thanks
    1
    Thanked 52 Times in 52 Posts
    Platforms
    MacOS X Unix/X11

    Default Re: Dynamically Loading UI With Unspecified Slots

    Instead of unpacking the ui to a plain QWidget (my_widget in your case), unpack it to a subclass of QWidget that has a slot named my_slot.
    It's nice to be important but it's more important to be nice.

  2. #2
    Join Date
    Nov 2008
    Posts
    38
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Dynamically Loading UI With Unspecified Slots

    The unpacking code doesn't have the subclass definition, that's the whole point, it's all going into scripting. The constraint is that the top-level class ONLY in the .ui file may be an arbitrary new class, everything which it includes must be available to the unpacker.

    Essentially, the .ui is guiding the arrangement of known classes and I need to hook into the new signals and slots.

Similar Threads

  1. how to dynamically add labels
    By mohanakrishnan in forum Qt Programming
    Replies: 5
    Last Post: 20th October 2009, 10:19
  2. Dynamically Add QCheckBox
    By ToddAtWSU in forum Qt Programming
    Replies: 0
    Last Post: 22nd January 2007, 19:00
  3. Dynamically Loading a QMainWindow?
    By natron in forum Newbie
    Replies: 10
    Last Post: 21st July 2006, 01:15
  4. Dynamically resizing in QT 3
    By kroenecker in forum Qt Programming
    Replies: 3
    Last Post: 9th January 2006, 18:37

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.