From: David L. <lon...@gm...> - 2010-01-18 22:33:37
|
On Mon, Jan 18, 2010 at 5:19 PM, B.W.H. van Beest <bw...@xs...> wrote: > When I run the MD simulation, this is done in a separate thread. When the > simulation is done, this thread terminates. So there are not many threads. > Just one extra for the MD. But you may be right: the number of signals that > is emitted is potentially enormous! So I reckon that using the > signal/slot approach is maybe not a good idea. My initial attempts were to > do everything in the same (main) thread, but. that gave the same (bad) > behaviour, but that may then be caused by the signals trying to update the > GUI. It was the example of the forcefield extension that made me switch to a > threaded solution. From you remarks I understand that before trying the > GLWidget::current()->renderNow() trick, I must get rid of this separate > thread first!? So long as the simulation is done in a new thread and all GUI updates are triggered by signals/slots, there shouldn't be a problem. I'd try adding the renderNow() call in the slot that updates the molecule object -- so long as it's not being called from the background thread. Dave |