Better_Software_Header_MobileBetter_Software_Header_Web

Find what you need - explore our website and developer resources

Signal/Slot Connection Throttlers

// trailing throttler, rate limiting at 1 emission every 100ms
KDSignalThrottler *throttler = new KDSignalThrottler(parent);
throttler->setTimeout(100ms);
connect(sender, &Sender::signal, throttler, &KDSignalThrottler::throttle);
connect(throttler, &KDSignalThrottler::triggered, receiver, &Receiver::slot);

About KDAB


2 Comments

7 - Apr - 2021

Julien

KDSignalThrottler::connect(100ms, sender, &Sender::signal, receiver, &Receiver::slot)

12 - Apr - 2021

Giuseppe D'Angelo

GiuseppeD'Angelo

Giuseppe D’Angelo

Senior Software Engineer

Learn Modern C++

Learn more