Results 1 to 5 of 5

Thread: Identifying signal emitter

  1. #1
    Join Date
    Jul 2008
    Posts
    5
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Identifying signal emitter

    Is there a way to identify the widget sending a signal if I connect a bunch of different widgets to the same slot?

    I have six QLineEdits on which I want to update the tools tip when the editingFinished () signal is sent. I would prefer to keep the processing to a minimum by only resetting the ToolTip for the edit that changed, rather than resetting all of them each time.

    Actually, it's not the processing, it just feels wrong to do all of them when only one is necessary!

    alan

  2. #2
    Join Date
    Dec 2007
    Posts
    628
    Thanks
    3
    Thanked 89 Times in 87 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Identifying signal emitter

    QSignalMapper is your friend.

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

    alan lenton (7th October 2009)

  4. #3
    Join Date
    Apr 2008
    Location
    Russia, Moscow
    Posts
    86
    Thanks
    2
    Thanked 7 Times in 7 Posts
    Qt products
    Qt4

    Default Re: Identifying signal emitter


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

    alan lenton (7th October 2009)

  6. #4
    Join Date
    Dec 2008
    Location
    TaganrogNativelandChehov,Russia
    Posts
    64
    Thanks
    1
    Thanked 8 Times in 7 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Identifying signal emitter

    It`s very often(oftentimes) problem.
    I think it must be add to FAQ.
    east or west home is best

  7. #5
    Join Date
    Jul 2008
    Posts
    5
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Identifying signal emitter

    I suspect you might be correct about putting it in the FAQ.

    Thanks for the help guys.

    alan

Similar Threads

  1. pthread instead QThread
    By brevleq in forum Qt Programming
    Replies: 8
    Last Post: 23rd December 2008, 07:16
  2. Connection of custon signals/slots
    By brevleq in forum Qt Programming
    Replies: 2
    Last Post: 23rd December 2008, 07:04
  3. Possible signal mapper problem
    By MarkoSan in forum Qt Programming
    Replies: 13
    Last Post: 25th January 2008, 13:11
  4. Replies: 2
    Last Post: 17th May 2006, 21:01

Tags for this Thread

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.