interface GUI die when run some " while() do "
Hi
I made some functions in which I used some " while () { .. }".
When the programe started, the GUI died , howerver the others applications worked well ( a bit slow but worked ).
I know I have to use moveToThread, I wrote some functions but they didn't work
Have you got any idea? Thanx a lot
Code:
{
Q_OBJECT
....
protected:
void run(){ exec();}
}
File ui:
Code:
void test_thread:: on_pushButton_clicked(){
QThreadEx * confThread = new QThreadEx()
config conf;
confThread->start;
conf.moveToThread(confThread);
connect(confThread, SIGNAL(started()),conf, SLOT(conf.test());
}
Re: interface GUI die when run some " while() do "
The slot connection is incorrect. Should be "SLOT(test())" and not "SLOT(conf.test())". Furthermore you create "conf" on the stack, so it is destroyed once the function returns.
Re: interface GUI die when run some " while() do "
I've already completed it with success :D. Thanx anyway