QThread plus textEdit appending
Hello, I'm having difficulties with appending text to an textEdit whilng in a QThread,
basically, I just call Bla.start() and in Bla::run() { ui->gui.textEdit->append("Test");
When I run the program, it crashes instant, do anyone have any idea why?
Thanks in advance.
Kokos.
Re: QThread plus textEdit appending
Quote:
Originally Posted by
Kokos
When I run the program, it crashes instant, do anyone have any idea why?
Sure. Widgets are not thread-safe, you can't access them from threads other than the main thread.
Re: QThread plus textEdit appending
Quote:
Originally Posted by
wysota
Sure. Widgets are not thread-safe, you can't access them from threads other than the main thread.
Aight.. Thanks for quick answer:)