If you downloaded a pre-built version of Qt, and are using VS2010, you will get this problem. Rebuild QT with VS2010 and it fixes it (I tested it).
So, it was toStdString causing the error, because of mismatches between VS2008 and VS2010 code generation for STL/Qt. It was not some other user code before, causing it to manifest there.
Bookmarks