开发者

toStdString/toStdWString bug?

i used like this: (vs2010 + qt4.7)

std::wstring test2 = L""; 
QString test =tr("test");
test2 = test.toStdWString();

debug and found test2:

귢bĀ

anyone can help me?

Now i make it working like this:

std::wstring test2 = L""; 
QString test =tr("test");
test2.resize(test.length());test2.resize(tes开发者_开发问答t.toWCharArray(&(*test2.begin())));

i copy that from the toStdWString


I suggest moving old QT binaries to a different directory to make sure your program isn't linking against them eg. Old4.7.1.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜