Results 1 to 3 of 3

Thread: Signal connected to slot (or signal)

  1. #1
    Join Date
    Oct 2008
    Posts
    29
    Qt products
    Qt4
    Platforms
    Windows

    Default Signal connected to slot (or signal)

    Hi

    is there any method to check if a signal is connected to a slot yet?

    regards.

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Signal connected to slot (or signal)

    Sure, there must be something in QMetaObject but I am to lazy to look into...
    Some simple options which might solve your issue are: Use Qt::UniqueConnection when connecting or have a look at QObject::receivers().

  3. #3
    Join Date
    Sep 2009
    Location
    UK
    Posts
    2,447
    Thanks
    6
    Thanked 348 Times in 333 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Signal connected to slot (or signal)

    You can also use connectNotify and disconnectNotify in your object.

Similar Threads

  1. how can i know how many slots connected to a signal?
    By yj_yulin in forum Qt Programming
    Replies: 6
    Last Post: 1st December 2008, 11:24
  2. Replies: 1
    Last Post: 8th November 2007, 18:11
  3. QTcpSocket connected signal problem
    By probine in forum Qt Programming
    Replies: 3
    Last Post: 19th January 2007, 12:18
  4. Emiting signal, which NOT connected to any slots
    By krivenok in forum Qt Programming
    Replies: 7
    Last Post: 27th February 2006, 17:32
  5. signal slot conection using a string, not a SLOT
    By rianquinn in forum Qt Programming
    Replies: 6
    Last Post: 5th February 2006, 19:52

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.