I have a problem with assigning a parent to the thread in the constructor of the dialog constructor:
The error as follows:Code:
ui(new Ui::Dialog) { ui->setupUi(this); thread_ptr=new Mythread(this); // <------------ here is the problem connect(thread_ptr,SIGNAL(valueChanged(int)),this,SLOT(On_value_changed(int))); }
Code:
error: no matching function for call to 'Mythread::Mythread(Dialog*)' thread_ptr=new Mythread(this); ^