The first error seems to be a missing #include <QPointF> statement.
The first error seems to be a missing #include <QPointF> statement.
Right, I missed that but I still get a bunch of errors. Below is the new compile output. (had to zip it because textfile was to large)
compileoutput2.txt.zip
Or does anyone know a better way to pass a number of points from one thread to another?
Still seems to be a missing include in samplingthread.h.
I can tell you in aedvance that once you solve these problems you will have to use qRegisterMetaType.
Do you have any idea on what's missing? Because before when I forgot the includes I got errors in my own files but now they are somewhere else. And aren't I already using qRegisterMetaType (in the first post in main.cpp)?
Also, a more general question so I dont waste time on this problem if it's a bad/inefficient solution; do I have the right approach to what I'm trying to achieve?
What I'm doing is that I want to have a worker thread reading sensor data and at some times I want to append some of the collected samples to a plot. Would it be better to use sared memory or something between the two threads? Seems harder though...
Based on the first error posted, seems a missing #include <QPointF>
You are using it for QVector<int> and not QVector<QPointF>.And aren't I already using qRegisterMetaType (in the first post in main.cpp)?
Well... it depends what you want to achieve. Most probably you can replace the thread with a timer. Of course this won't cause your missing include problem to disappearAlso, a more general question so I dont waste time on this problem if it's a bad/inefficient solution; do I have the right approach to what I'm trying to achieve?
Mindstormer (27th March 2014)
Finally was able to solve the problem! It turns out that I was looking in the wrong file, I had QpointF included in my samplingthread.cpp but I had forgot to include it in my samplingthread.h file!
You know why I had to include QpointF when Qvector in the header file? I'm just curious... :P
I was using QVector<QPointF> in the registermetatype but the error was in the header file as I just discovered.
Thanks for all the help guys, problem solved and I'm happy to move on!
Bookmarks