c++ - Signals and slots QT -


i have asked number of different questions regarding 1 main issue in program , still not solved @ all, i'm using threading keep ui locking up, still because apparently can't ui stuff in threads.

so i've been told use custom signals , slots (not examples given).

so documentation i've read came code:

.h

signals:  void paint_signal(double x, double y); 

.cpp

  connect(this,signal(paint_signal(double x, double y)), this, slot(paintsomething(x,y))); 

the paintsomething function within same class of this....

thread:

*future2 = qtconcurrent::run(this, &gui::paintall); 

paint emits paint_signal , passes 2 doubles

emit paint_signal(x, y); 

but error don't understand @ all

 connect: no such signal gui::paint_signal(double x, double y) 

connect(this,         signal(paint_signal(double, double)),          this,          slot(paintsomething(x,y))); 

remove parameter names , should work. if 1 doesn't work 1 will:

    connect(this,         signal(paint_signal(double, double)),          this,          slot(paintsomething(double,double))); 

let me know if works out :)

update

the idea cannot use ui in thread, instead emit signals thread ui. because answer gets beginning (and possibly new question) here working example of how emit signals threads:

qt signals ui in thread


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -