Hi,
I have code similar to this
but its not working correctly without some delay so I use msleep(100) between signal_AddTextTo_QPlainTextEdit and signal_QPlainTextEdit_scroll.Qt Code:
void MyThread::run(void) //QThread function { for(int i=0;i < 100; i++) emit signal_AddTextTo_QPlainTextEdit(/* */); //then I want to auto scroll to the top so I emit a signal emit signal_QPlainTextEdit_scroll(QTextCursor::Start);//its not working correctly without msleep() after for loop }To copy to clipboard, switch view to plain text mode
I dont like using msleep, it there any other solution ? wait for event (signal) finishes or something else ?
Bookmarks