On 05/11/2020 12.24, Jérôme Godbout wrote:
Maybe you can add an event filter and remove some of the events if
they are happening too close to each others. But I thing doing that
logic into the event handler is a betetr idea, where you can either
cumulate and delay execution of the behavior.
This. Separate your logic that decides an update is needed from the logic that actually does the update, and have the former *queue* (if not already queued) an event to do the latter.

I've used this technique on quite some occasions and IIUC Qt uses it internally when repainting widgets (n.b. QWidget::update).

If possible, also move some of that slow logic to a different thread...

--
Matthew
_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to