Unsolved Stack overflow error with signal & slots
-
I am not sure why this is blowing the stack, how can I correct this code?
-
Use
textEdited()
signal instead oftextChanged()
The explanation of why you are having this is that when you call
setText()
a newtextChanged()
signal is emitted and so on to infinity (or up to the limit of the size of the stack that then goes overflow) -
@VRonin awesome, I realized I now why I was causing a new event to get fired, thanks!
-
@mrjj I didn't know about this handy debug helper, thanks for pointing it out :)
-
@c0d3r
yes qDebug() is super
most Qt classes have overloaded << for itso
qDebug() << "info:" << someqtobject ;
works really well :)
Even lists etc.