PDA

View Full Version : debugging "signal does not reach slot" in a template class



Daniel Dekkers
1st April 2010, 13:57
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

axeljaeger
3rd April 2010, 16:03
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.