Hello sir this is what i did but not getting the right result.. Still some alignment problem.
QSqlQuery sq1
("SELECT ChannelData FROM Bulkdb where rowid = " + QString::number(rowcnt
));
while(sq1.next())
{
rowdata.push_back(sq1.value(0).toString());
}
for(int j = 0; j < rowdata.count(); j++) // All the data from Bulk BD which is in rowdata is appended to datstr
datstr.append(rowdata.at(j));
}
QSqlQuery sq1("SELECT ChannelData FROM Bulkdb where rowid = " + QString::number(rowcnt));
while(sq1.next())
{
rowdata.push_back(sq1.value(0).toString());
}
for(int j = 0; j < rowdata.count(); j++) // All the data from Bulk BD which is in rowdata is appended to datstr
datstr.append(rowdata.at(j));
}
To copy to clipboard, switch view to plain text mode
in the Next function i am trying to append 2944 chars to the comdata at a time. IS this right what i am doing sir.
comdata.append(datstr.right(2944));
newdat.append(comdata.mid(posi, 80));
posi+=92;
qDebug() << newdat;
comdata.append(datstr.right(2944));
newdat.append(comdata.mid(posi, 80));
posi+=92;
qDebug() << newdat;
To copy to clipboard, switch view to plain text mode
i am using fromrawdata while retrieving the data from rs232 terminal.
QByteArray data = (QByteArray::fromRawData(buff,numBytes));
Bookmarks