Start a thread automatic at start
I have an application with start and stop buttons for the thread.
How can I make the thread start without pushing the start button?
I want the application to startup at boot time.
void Dialog::on_pushButton_clicked()
{
mThread->start();
mThread->Stop = false;
ui->running->setText("Startad");
}
Re: Start a thread automatic at start
Just call on_pushButton_clicked() from the mainwindow ctor after setupUi()
Re: Start a thread automatic at start
By calling mThread->start() somewhere else?
Like after creating it?
Cheers,
_
Re: Start a thread automatic at start
Quote:
Originally Posted by
Santosh Reddy
Just call on_pushButton_clicked() from the mainwindow ctor after setupUi()
So simple, I'm so glad for experts. Thanks a lot!
Ralph in Sweden