Results 1 to 2 of 2

Thread: Qt slots sender pointer

  1. #1
    Join Date
    Jan 2007
    Location
    Paris
    Posts
    459
    Thanks
    98
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4 Qt5

    Default Qt slots sender pointer

    Hey there,

    If I have multiple objects connected to a single slot,
    when receiving a signal and inside the slot function, is it possible to know which QObject sent it without passing the QObject pointer to the signal ?

    Thanks.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Qt slots sender pointer

    Take a look at QObject::sender().

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

    bunjee (18th January 2009)

Similar Threads

  1. Replies: 12
    Last Post: 23rd June 2008, 08:05
  2. Adding slots in Designer
    By jamos in forum Qt Tools
    Replies: 5
    Last Post: 18th May 2006, 23:28

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.