T
T
TemaKam2021-03-09 11:14:35
PyQt
TemaKam, 2021-03-09 11:14:35

Why do popups called on a thread freeze?

I mean the usual pop-up messages, by type
QtWidgets.QMessageBox.information
If you call from the main thread - everything is fine,
but if from the threading.Thread thread - then everything hangs

If you use QThred, then it won't hang? Or is that not the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
bbkmzzzz, 2021-03-09
@TemaKam

if to use QThred, then will not hang up? Or is that not the problem?

You can't call widget methods from another thread, that's the way to go.
You emit a signal, catch it in the main graphics stream, react by showing a window.
but if from the threading.Thread - then everything hangs

Qt has QThread and QThreadPool + QRunnable

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question