Results 1 to 2 of 2

Thread: debugging "signal does not reach slot" in a template class

  1. #1
    Join Date
    Feb 2010
    Posts
    9
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default debugging "signal does not reach slot" in a template class

    Hi,

    I have a template class c_A that i want to send signals to from a small QWidget containing buttons. Avoiding the Q_OBJECT/template problem, i made a c_AInterface class that has a public virtual slot Slot(). c_A inherits from c_AInterface and overides Slot(). In the constructor of another QDialog (that contains the small QWidget as well as an instance of c_A) i connect a button of the QWidget to the slot Slot(). When i press the button... (you guessed it)... nothing happens. The Slot() is not called.

    My question... How do you debug something like that (i'm using Microsoft Visual Studio 2008). Is there any way to "follow" the signal/slot mechanism or is there a window/console that errors are sent to?

    Kind Regards,
    Daniel Dekkers

  2. #2
    Join Date
    Jan 2006
    Location
    Frankfurt
    Posts
    500
    Thanks
    1
    Thanked 52 Times in 52 Posts
    Platforms
    MacOS X Unix/X11

    Default Re: debugging "signal does not reach slot" in a template class

    The only error that could be of interest is the fail of the connect-command that is send to the debugger on windows and on stderr on unix. You can also check the return value of connect.
    It's nice to be important but it's more important to be nice.

Similar Threads

  1. Replies: 1
    Last Post: 23rd August 2008, 22:09
  2. Replies: 4
    Last Post: 19th March 2008, 17:47
  3. Translation QFileDialog standart buttons ("Open"/"Save"/"Cancel")
    By victor.yacovlev in forum Qt Programming
    Replies: 4
    Last Post: 24th January 2008, 19:05
  4. Signal defined in "a.h" can not emit in "b.cpp"
    By Shawn in forum Qt Programming
    Replies: 9
    Last Post: 21st May 2007, 16:55
  5. Replies: 2
    Last Post: 25th August 2006, 11:35

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.