I am using Qt 4.3.0 with MS Visual Studio 2005 and I am having major problems trying to convert a QString to a char*. I get a Debug Assertion Failed! message when I try to create a std::string from a QString. I am used to using QString.toStdString( ).c_str( ) to convert my QString to a char* and I was having problems with this when I tried to exit the function I was in. I broke my call into 2 lines and the only line I am calling looks like this
Qt Code:
std::string sname = selected.toStdString( );To copy to clipboard, switch view to plain text mode
This is the only call inside the function, I have commented the rest out and I still crash trying to exit the function. Has anybody else had problems trying to convert a QString to a std::string or char* in MS Visual Studio 2005? I don't recall having this problem when I used Visual Studio 2003. Thanks for your help!
Bookmarks