How to emit a signal with array parameter to another Thread
<p>I am new to Qt and I want to emit a signal from a QThread to main Thread with a few parameter. It doesn't work. What am I doing wrong?</p>

<pre><code>//reader.h
signals:
        void updateData(quint16 fw, QString serial, quint16 *calibration);
//reader.cpp
...
{
    quint16 calibration[8];
    quint16 fw;
    QString serialNumber;
    readData(&amp;fw, &amp;serialNumber, calibration);
    // Declaration: void Reader::readData(quint16 *fw, QString *serial, quint16 *calibration) 
    emit updateData(fw, serialNumber, calibration); // In this function all parameters are assigned correctly
}
//mainwindow.h
 public slots:       
            void updateData(quint16 fw, QString serialNumber, quint16 *calibration);
//mainwindow.cpp
void MainWindow::updateData(quint16 fw, QString serialNumber, quint16 *calibration)
{   
    ui-&gt;lineEditFW-&gt;setText(QString::number(fw));     // correct
    ui-&gt;lineEditSerialNumber-&gt;setText(serialNumber);  // correct
    ui-&gt;spinBoxReg1-&gt;setValue(calibration[0]);        // incorrect!
    ui-&gt;spinBoxReg2-&gt;setValue(calibration[1]);        // ..array calibration
    ui-&gt;spinBoxReg3-&gt;setValue(calibration[2]);        // ..is filled with
    ui-&gt;spinBoxReg4-&gt;setValue(calibration[3]);        // ..random data!
    ui-&gt;spinBoxReg5-&gt;setValue(calibration[4]);
    ui-&gt;spinBoxReg6-&gt;setValue(calibration[5]);
    ui-&gt;spinBoxReg7-&gt;setValue(calibration[6]);
    ui-&gt;spinBoxReg8-&gt;setValue(calibration[7]);
}
//...
init()
{
   // other connection of thread and reader object
   //...
   connect(reader, SIGNAL(updateData(quint16, QString, quint16 *)), this, SLOT(updateData(quint16, QString, quint16 *)));
   //...
   reader-&gt;moveToThread(readerThread);
   readerThread-&gt;start();
}
</code></pre>

<p>I also tried it with array instead of pointer. It didn't work as well.</p>

<p>Thanks.</p>