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]);
}
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]);
}
To copy to clipboard, switch view to plain text mode
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|
sources\tableeditor.cpp|917|error: passing `const QString' as `this' argument of `QString& QString::operator=(const QString&)' discards qualifiers|
To copy to clipboard, switch view to plain text mode
Bookmarks