I am writing a small mp3 player and are having a problem with the playlist that I have writen using QTableView with QStandardItemModel. I am not wanting to use the build in playlist from QMultimedia as I am using this method to learn about Qt and C++.
Problem:
When I add files to the playlist (Drag and drop) the files are processed with TAGLIB and the mp3 tags are then populated into a taleview.
When the number of files dragged into the playlist exceeds 2000+ the main gui freezes up.
So it is clear I need to run the population of the playlist in a thread.
Question:
how would I fill the model with data from within the thread when the model lives in the main only? Should or can i give my model as references when I call the thread?
What would be the safest way of implementing such a solution where the worker thread has to update an object in another thread (main), not wanting to pass large result sets.
Any tips is most appriciated!


Reply With Quote


irectConnection as the fifth argumen to connect())

Bookmarks