It does not create a chart
-
That queue variable belongs to your mythread class. It's not the same as the one from your MainWindow class even if it has the same name.
wrote on 11 Jan 2021, 18:30 last edited by@SGaist can i connect them, or what can i do for this problem? I read and write in mythread.cpp
If i move initChartView and timer_slot, is it true? -
@suslucoder said in It does not create a chart:
If i move initChartView and timer_slot, is it true?
It won't change anything as these two variables will still be unrelated.
@suslucoder said in It does not create a chart:
can i connect them, or what can i do for this problem? I read and write in mythread.cpp
You have to get the data from your mythread object back to your MainWindow.
As I already suggested, you really should start with C++ basics before playing with threading.
-
@suslucoder said in It does not create a chart:
If i move initChartView and timer_slot, is it true?
It won't change anything as these two variables will still be unrelated.
@suslucoder said in It does not create a chart:
can i connect them, or what can i do for this problem? I read and write in mythread.cpp
You have to get the data from your mythread object back to your MainWindow.
As I already suggested, you really should start with C++ basics before playing with threading.
wrote on 11 Jan 2021, 19:01 last edited by@SGaist said in It does not create a chart:
You have to get the data from your mythread object back to your MainWindow.
What is the way for getting datas from mythread to my mainwindow? I would be very happy if you could show me the way
-
Use a signal to transfer the queue. Make it a const reference.
-
wrote on 11 Jan 2021, 20:44 last edited by
@SGaist can you show me an example? I did not understand
-
What did you not understand ?
-
wrote on 11 Jan 2021, 21:02 last edited by
@SGaist if my slot is my queue, what should be the signal. I didnt understand it.
-
Your slot is not your queue. Did you read the chapter about signals and slots ?
-
Your slot is not your queue. Did you read the chapter about signals and slots ?
wrote on 12 Jan 2021, 05:45 last edited by@SGaist yes i did. But i cannot understand how can i get datas
-
@SGaist yes i did. But i cannot understand how can i get datas
@suslucoder What exactly can't you understand? In the documentation @SGaist posted there is even an example with signal/slot with parameter...
14/14