Unsolved run a separate thread in Qt app
-
Hi,
I want to make an app with multithread, so when I click a button, I want to execute what's in the body of its signal in a separate thread, so I do like this in the constructor:
QThread *t=new QThread;connect(this,&MainWindow::on_btnTalk_clicked,t,&QThread::start);
but it doesn't work. how to solve it?
-
@Designer23 said in run a separate thread in Qt app:
but it doesn't work. how to solve it?
This is no error description.
First think about if you really really need a thread, then read the documentation, then think again.
And if you really sure - show us your complete code where you use the thread and what you're doing in the thread.