spraff
21st January 2009, 15:13
I need to call certain methods on a QWidget from a thread other than the main GUI thread. I understand this isn't safe, but it is safe to post events to a QWidget that can be processed asynchronously.
At the moment the only methods I need to call in this fashion are width() height() update() and resize(...), but this may grow.
Is there a page of documentation somewhere which maps method calls to equivalent QEvents which could be posted to the same effect?
I expect width() and height() are safe, if by accident rather than design, and there's a promising QResizeEvent, but what about update()?
Is this a sensible solution? Or should I perhaps subclass QEvent to store the desired calls? Or something else?
Thanks for your advice
At the moment the only methods I need to call in this fashion are width() height() update() and resize(...), but this may grow.
Is there a page of documentation somewhere which maps method calls to equivalent QEvents which could be posted to the same effect?
I expect width() and height() are safe, if by accident rather than design, and there's a promising QResizeEvent, but what about update()?
Is this a sensible solution? Or should I perhaps subclass QEvent to store the desired calls? Or something else?
Thanks for your advice