codeman
5th June 2009, 11:43
Hello friends I have to cut elements before transfer to DB:
My approach is
int i_fieldlength[]={4,2,4,40,8,6,5,3,8,1,5,3,7,8};
for(int i =0; i < sizeof(i_fieldlength);i++){
QString strbuf = splitlinelist.at(i);
splitlinelist.at(i)=strbuf.left(i_fieldlength[i]);
}
Is there a more elegant way or faster way to do this???
Ups this approach create an error:
sources\tableeditor.cpp|917|error: passing `const QString' as `this' argument of `QString& QString::operator=(const QString&)' discards qualifiers|
My approach is
int i_fieldlength[]={4,2,4,40,8,6,5,3,8,1,5,3,7,8};
for(int i =0; i < sizeof(i_fieldlength);i++){
QString strbuf = splitlinelist.at(i);
splitlinelist.at(i)=strbuf.left(i_fieldlength[i]);
}
Is there a more elegant way or faster way to do this???
Ups this approach create an error:
sources\tableeditor.cpp|917|error: passing `const QString' as `this' argument of `QString& QString::operator=(const QString&)' discards qualifiers|