QString temptext;
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
temptext = "{\blur6\fad(300,600)\fs70\pos(386,268)}монстры";
temptext.remove(QRegExp("{[^}]*}",Qt::CaseInsensitive,QRegExp::RegExp2));
qDebug()<<temptext;
qDebug()<<QString::fromLocal8Bit(temptext.toAscii());
Сделай слэши в строке двойными:
"{\\blur6\\fad(300,600)\\fs70\\pos(386,268)}монстры"
QTextCodec::setCodecForCStrings(QTextCodec::codecForName("UTF-8"));
temptext = "{\\blur6\\fad(300,600)\\fs70\\pos(386,268)}монстры";
//"{\blur6\fad(300,600)\fs70\pos(386,268)}монстры"
РЕШЕНО!
QString temptext;
temptext = "{\blur6\fad(300,600)\fs70\pos(386,268)}монстры";
temptext.remove(QRegExp("\\{[^\\}]*\\}"));
qDebug()<<temptext;
Форум Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)