Hello!

I would like to know if someone know's how to pass a Qvector<QPointF> through signals & slots. I've been able to pass a QVector<int> through signals and slots but I'm unable to pass a vector containing QPointF. Could anyone tell me what I'm doing wrong? I will post some sample code below:

main.cpp:
Qt Code:
  1. int main(int argc, char *argv[])
  2. {
  3. QApplication app(argc, argv);
  4. app.setPalette(Qt::darkGray);
  5.  
  6. qRegisterMetaType< QVector<int> >("QVector<int>");
  7.  
  8. MainWindow mainWindow;
  9.  
  10. SamplingThread samplingThread;
  11. samplingThread.setInterval(1000);
  12.  
  13. mainWindow.connect(&samplingThread, SIGNAL(sendSampleVector(QVector<int>)), &mainWindow, SLOT(plotSampleVector(QVector<int>)));
  14.  
  15. mainWindow.show();
  16.  
  17. samplingThread.start();
  18.  
  19. bool ok = app.exec();
  20.  
  21. samplingThread.stop();
  22. samplingThread.wait(1000);
  23.  
  24. return ok;
  25. }
To copy to clipboard, switch view to plain text mode 

samplingthread.cpp (in samplingthread.h the signal is defined as: void sendSampleVector(QVector<int>))
Qt Code:
  1. #include "samplingthread.h"
  2. #include <QVector>
  3.  
  4. SamplingThread::SamplingThread( QObject *parent ):
  5. QwtSamplingThread( parent )
  6. {
  7. }
  8.  
  9. void SamplingThread::sample(double elapsed)
  10. {
  11. QVector<int> sampleVector;
  12. sampleVector.append(1);
  13. sampleVector.append(2);
  14. sampleVector.append(3);
  15.  
  16. emit sendSampleVector(sampleVector);
  17. }
To copy to clipboard, switch view to plain text mode 

mainwindow.cpp (in mainwindow.cpp the slot is defined as void plotSampleVector(QVector<int>))
Qt Code:
  1. void MainWindow::plotSampleVector(QVector<int> sampleVector)
  2. {
  3. qDebug()<<sampleVector;
  4. }
To copy to clipboard, switch view to plain text mode 

Now, the code above works but when I swap the int to QPointf I get tons of errors and it doesn't work. What am I not understanding in this case?

Also, when using QPointF my samplingthread.cpp is:
Qt Code:
  1. void SamplingThread::sample(double elapsed)
  2. {
  3. QVector<QPointF> sampleVector;
  4. sampleVector.append(QPointF(1.0,1.0));
  5. sampleVector.append(QPointF(2.0,2.0));
  6. sampleVector.append(QPointF(3.0,3.0));
  7.  
  8. emit sendSampleVector(sampleVector);
  9. }
To copy to clipboard, switch view to plain text mode 

All help apreciated, thanks!