Results 1 to 3 of 3

Thread: C++/Qt5 - Signals with no receiver, what happens?

  1. #1
    Join Date
    Oct 2006
    Posts
    105
    Thanks
    13
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default C++/Qt5 - Signals with no receiver, what happens?

    Hello,

    Suppose I have a mainwindow emitting signals to a dialog.
    What happens if there is no dialog active at the time the sinals are sent?
    Do the signals just vanish or is memory used and left floating (leak).
    This has not happend, its just a question.

    Regards

  2. #2
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,536
    Thanked 284 Times in 279 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: C++/Qt5 - Signals with no receiver, what happens?

    Signals are supplied to connected recivers. When receiver is deleted all signals connected to them are auto disconnected. So when You send a signal without receivers nothing happens.

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

    jimbo (12th October 2016)

  4. #3
    Join Date
    Oct 2006
    Posts
    105
    Thanks
    13
    Thanked 4 Times in 4 Posts
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows

    Default Re: C++/Qt5 - Signals with no receiver, what happens?

    Hello Lesiok,

    Thanks for your response.
    So not a problem, if it happens.

    Regards

Similar Threads

  1. TFTP with QT(Server Receiver File)
    By RVM in forum Qt Programming
    Replies: 1
    Last Post: 31st December 2015, 20:27
  2. Emit to specific receiver
    By matsukan in forum Qt Programming
    Replies: 1
    Last Post: 28th September 2012, 12:59
  3. Is there any way to set a 'contexmenu receiver'?
    By tonnot in forum Qt Programming
    Replies: 0
    Last Post: 28th October 2011, 10:16
  4. Receiver
    By Salazaar in forum Newbie
    Replies: 1
    Last Post: 5th May 2007, 19:26
  5. postEvent() to a non-existing receiver
    By Artschi in forum Qt Programming
    Replies: 7
    Last Post: 1st June 2006, 14:44

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.