[SOLVED] QTextEdit not appending from within timer slot.
-
wrote on 31 Jan 2014, 00:40 last edited by
Very strange ... i have a text edit box and , in my timer slot , i try to enter text into the box :
textBox->append("my text") . But nothing happens . Any ideas ?I must be missing something really easy but I am just not seeing it .
The text box works fine from the class constructor but not within the timer slot .
I am pretty sure I have updated the gui from a timer slot before so ... or is it not possible ? -
wrote on 31 Jan 2014, 05:03 last edited by
The timer works . The slot runs on timeout . For some reason nothing happens on textBox->append(“my text”) . All other code in the slot runs but nothing is appended to the text box .
-
wrote on 31 Jan 2014, 05:08 last edited by
Try "Clean all" , "Run qmake", "Rebuild all".
If not helps can you post your code or minimal compilable project? -
wrote on 31 Jan 2014, 06:00 last edited by
Looks like it has to do with where I initialized my text box . I was initializing it inside the resize event of the window .
I moved the initialization ( textBox = new QTextEdit(this); ) to the constructor and now textBox->append(“my text”) in the timer slot works .
1/5