With the following piece of code:
QString msg;
msg = "Datalogging Item" + ',' +
QString::number(item) + ',' +
"Slave Index" + ',' +
QString::number(slaveIndex) + ',' +
"Slave Name" + ',' +
slaveName + ',' +
"Experiment Index" + ',' +
QString::number(expIndex) + ',' +
"Experiment Name" + ',' +
expName + ',' +
"Aquisition Frequency " + ',' +
"33 Hz" + "\n";
qDebug() << msg;
I was getting the following debug output
"riment Index0,Slave Index,0,Slave Name,Execute 1,Experiment Index,0,Experiment Name,Read All (Barebone),Aquisition Frequency ,33 Hz\n"
Wich is not really what I was expected to get.
But with the code modified with the QString typecast:
QString msg;
msg = QString("Datalogging Item") + QString(',') +
QString::number(item) + QString(',') +
QString("Slave Index") + QString(',') +
QString::number(slaveIndex) + QString(',') +
QString("Slave Name") + QString(',') +
slaveName + QString(',') +
QString("Experiment Index") + QString(',') +
QString::number(expIndex) + QString(',') +
QString("Experiment Name") + QString(',') +
expName + QString(',') +
QString("Aquisition Frequency ")+ QString(',') +
QString("33 Hz") + QString("\n");
qDebug() << msg;
I get what I expected to get:
"Datalogging Item,0,Slave Index,0,Slave Name,Execute 1,Experiment Index,0,Experiment Name,Read All (Barebone),Aquisition Frequency ,33 Hz\n"
Do you have any clue on what is going on? I just don't get what is going on and I'm a newbie to QT.
Thanks.