I created a callback "on_textEdit_selectionChanged" from the GUI designer "Goto SLOT" and have a ui->textEdit->setText(msg) in that callback.

When triggered by changing the selection in a different callback, the selectionChanged function executes but does not write to the ui.
When triggered by a mouse click in the textEdit the selectionChanged function executes and does write to the ui.

The very same code writes to the ui in one case but not the other. Can someone explain why?

*Selection changed in another member function with with "ui->textEdit->selectAll()"