Sign up for the KDAB Newsletter
Stay on top of the latest news, publications, events and more.
Go to Sign-up
Find what you need - explore our website and developer resources
24 July 2024
Sometimes a signal fires too often, and, as a result, your user interface feels sluggish. A solution to this is often a timer to compress the signal. In this episode, I'll show you a class from KDToolBox which makes such code easier to read.
Links:
* https://github.com/KDAB/KDToolBox/tree/master/qt/KDSignalThrottler
* All 'Introduction to Qt Widgets' episodes: https://www.youtube.com/playlist?list=PL6CJYn40gN6iFcTyItvnE5nOmJR8qk_7o
0:00 Intro
0:22 The UI which is slow
1:37 The slow application
4:30 One solution: use a QTimer
5:38 Advertizement
6:03 The QSignalThottler example
7:59 Using KDSIgnalDebouncer in the list view example
9:11 Is the UI now slower?
10:23 The setup of dashlets and favorites
11:24 The code for the dashlets
13:58 The problem: slow start up time
15:35 The code for delaying initialization
The example code showcased in this video is available here: https://github.com/KDABLabs/kdabtv/tree/master/Qt-Widgets-and-more/SignalDebouncer
All Qt Widgets and more videos:
https://www.youtube.com/playlist?list=PL6CJYn40gN6gf-G-o6syFwGrtq3kItEqI