Qt DoubleSpin Box value changed slot has called twice
Unsolved
General and Desktop
-
@Wael11
For anyone reading this: This is known behaviour, which I stumbled across a long time ago and it was infuriating.With a
QSpinbox
Qt Internal code uses a timer on clicks/presses. If you step through in debugger you exceed the timeout and get bad/double behaviour.Simplest: change all
connect()
toQSpinbox
click/key to passQt::QueuedConnection
as last parameter for connection type, not defaultQt::DirectConnection
. Now you can use debugger breakpoints and all will be well. I wrote a method to connect all my spinboxes like this.