doomtrauma
doomtrauma

Reputation: 1

PyQt - Refreshing a QStandardItemModel element's text effectively

Say I have a QListView and each item in this list is meant to be refreshed with the output of a certain system process (such as some intensive file I/O-ing) which is triggered in a thread (using threading.Thread). The problem I have is that the main window's application freezes shortly after I start a new thread and halts the application. Is there a more effective way to achieve this?

Upvotes: 0

Views: 189

Answers (1)

ekhumoro
ekhumoro

Reputation: 120608

It sounds like you should be using QThread rather than threading.Thread.

This question has a lot of useful discussion about how to use threads correctly in PyQt applications.

Upvotes: 1

Related Questions