Of who's update are you talking about? The list box?
I was thinking more like: you have a list of songs( QList, whatever). This should behave like an external model for the list box. That is when you add an item, you update the list, and as a result of this the widget will get updated also.
You should have a few functions for accessing the list's contents.
Reading and writing to the list should be guarded with a mutex.
You also could add a remove item function which you *call* from the thread when the current song ends. By call I mean emitting a signal from the thread.
But I guess there are other methods. You should choose the one that feels more scalable to you, since I assume your application is just at its beginning, and it will get more complex.
Regards




Reply With Quote


Bookmarks