PDA

View Full Version : Cant write textEdit with ui->textEdit->setText(message)



null_ptr
3rd November 2016, 23:27
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()"