Hacker News new | ask | show | jobs
by nyanpasu64 1957 days ago
If one user interaction triggers a "on user interaction" signal, which causes "value changed" signals to fire, is it possible that a widget which depends on multiple of these to get redrawn multiple times?

I'm optimistic about Qt 6's QProperty (I don't know how it compares to FRP or, as someone else mentioned, MobX), but Qt 6 currently does not have KDE libraries, or Linux themes to fit into desktop environments or distros.

1 comments

Yes, potentially, if that is how you program it. But typically you call QWidget::update() which repaints the widget next time through the event loop, if anything changes. Calling QWidget::update() several times will usually only call one repaint.

One thing you have to watch out for it that programmatic changes can fire signals. If you don't want this you have to add QObject::blockSignals(true);...QObject::blockSignals(false); around your call.