kingslee
16th October 2006, 20:20
Hallo,
I used qstring find member to find a string.
but it gives error " class QString has no member named :find "
and I followed the qt documentation too.
Here is the code.
I included qstring.h
if(line.find(QRegExp("DEF"),0) != -1 && line.find(QRegExp("Shape"),0) != -1)
{
line.remove(0,line.find(QRegExp("DEF"),0)+4);
if(line.mid(0,line.find(QRegExp("Shape"),0)-1).find(QRegExp("_"),0) != -1)
{
line.remove(line.find(QRegExp("_"),1);
}
}
looking forward for ur reply.
thanks.
I used qstring find member to find a string.
but it gives error " class QString has no member named :find "
and I followed the qt documentation too.
Here is the code.
I included qstring.h
if(line.find(QRegExp("DEF"),0) != -1 && line.find(QRegExp("Shape"),0) != -1)
{
line.remove(0,line.find(QRegExp("DEF"),0)+4);
if(line.mid(0,line.find(QRegExp("Shape"),0)-1).find(QRegExp("_"),0) != -1)
{
line.remove(line.find(QRegExp("_"),1);
}
}
looking forward for ur reply.
thanks.