Results 1 to 3 of 3

Thread: Passing signals

  1. #1
    Join Date
    Feb 2008
    Posts
    40
    Thanks
    9
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Passing signals

    Hello there!

    I would like to create wrapper widget, that will hold some other (not specified) widget inside (and some other, this time quite concrete widget - QLineEdit). What I need is to catch all signal from this inner widget and pass them outside - but I don't know which signal inner widget emits. Is there any way to connect all signal from a widget to a one slot and then emit them again without letting my wrapper know anything about those signals?

  2. #2
    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: Passing signals

    You can declare the signals in your wrapper widget and connect inner widget signals to wrapper widget signals directly.
    Qt Code:
    1. connect(lineEdit, SIGNAL(returnPressed()), this, SIGNAL(returnPressed()));
    To copy to clipboard, switch view to plain text mode 
    Making it dynamic like you describe is not a straightforward thing to do..
    J-P Nurmi

  3. #3
    Join Date
    Feb 2008
    Posts
    40
    Thanks
    9
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Passing signals

    Great, thanks. I'll take a look

Similar Threads

  1. Signals and Slots
    By 83.manish in forum Qt Programming
    Replies: 3
    Last Post: 30th June 2008, 10:31
  2. Problem with SpinBox signals and slots
    By ramstormrage in forum Newbie
    Replies: 4
    Last Post: 2nd May 2008, 01:45
  3. QThread and signals (linux/UNIX signals not Qt Signals)
    By Micawber in forum Qt Programming
    Replies: 1
    Last Post: 28th November 2007, 22:18
  4. Replies: 2
    Last Post: 17th May 2006, 21:01
  5. KDE Signals
    By chombium in forum KDE Forum
    Replies: 1
    Last Post: 25th January 2006, 18:45

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.