Skip to content

fix: push log messages to the message bar from the main thread - #127

Merged
lachlangrose merged 1 commit into
mainfrom
fix/log-message-bar-main-thread
Oct 4, 2026
Merged

lachlangrose merged 1 commit into
mainfrom
fix/log-message-bar-main-thread

Conversation

@lachlangrose

Copy link
Copy Markdown
Member

QTimer.singleShot(0, func) runs func on the calling thread, not the Qt main thread. A log message with push=True from a background task (for example the thickness calculator) changed the QGIS message bar from the worker thread, and QGIS stopped responding when the task ended.

Send the message bar change to the main thread with a queued signal.

QTimer.singleShot(0, func) runs func on the calling thread, not the Qt
main thread. A log message with push=True from a background task (for
example the thickness calculator) changed the QGIS message bar from the
worker thread, and QGIS stopped responding when the task ended.

Send the message bar change to the main thread with a queued signal.
@lachlangrose
lachlangrose merged commit cf2ebb9 into main Oct 4, 2026
4 checks passed
@lachlangrose
lachlangrose deleted the fix/log-message-bar-main-thread branch October 4, 2026 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant