Results 1 to 16 of 16

Thread: Connect signal from base to slot of sub-sub-object

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2008
    Posts
    66
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default Connect signal from base to slot of sub-sub-object

    We have a GUI, in that GUI we have an object of Class A. In the instance of Class A we have a member instance Class B.

    How would you connect a signal from the GUI to the SLOT of Class B.

    My fast and dirty sollution would be to forward the "this-ptr" of GUI to Class A
    and make there the connection.

    But what it we have n sub-objects?
    Is there clean way of doing this?


    EDIT:

    Maybe a Signal (GUI) ->Signal (ClassA) -> SLOT (Class B) connection?
    This looks much better.
    Last edited by donglebob; 30th October 2008 at 10:18.

Similar Threads

  1. Replies: 12
    Last Post: 18th September 2008, 15:04
  2. Signal in base class Slot in Subclass
    By csvivek in forum Newbie
    Replies: 7
    Last Post: 30th March 2008, 16:59
  3. Signal to specific object slot
    By bunjee in forum Qt Programming
    Replies: 2
    Last Post: 27th December 2007, 15:51
  4. Connecting to a base class signal?
    By AaronMK in forum Qt Programming
    Replies: 4
    Last Post: 26th October 2007, 22:37
  5. Replies: 2
    Last Post: 17th May 2006, 21:01

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.